 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
|
 |
|
 |
04-18-2009, 07:29 PM
|
#61 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Wow, I just read from the beginning, this is a very interesting project.
If you are writing your own framework, which of course I'm just getting familiar with OO and frameworks, what do you not like about Zend's framework and cakePHP? Not that I know anything about them...
Also, are you going to setup that SVN or whatever versioning system it is that salathe was looking for?
|
|
|
|
04-18-2009, 08:39 PM
|
#62 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Quote:
|
what do you not like about Zend's framework and cakePHP? Not that I know anything about them...
|
Honestly, there is a lot I dislike about most of the frameworks out there, but the two biggest issues I have are:
1) They are huge and bloated. There is no reason why a framework should be over 2MB in size. I know they boast a lot of extras, but I just want the basics. I'm too impatient to wade through all of that extra stuff!
2) They are complicated. They make it way to hard to do things that would otherwise be simple and straight forward.
Quote:
|
Also, are you going to setup that SVN or whatever versioning system it is that salathe was looking for?
|
Maybe. Truth be told doing so would just be another step I have to take. I know changes are happening pretty rapidly and it is hard to keep up with all of them, but things should slow down significantly once the framework is released to the general public.
|
|
|
|
04-18-2009, 08:48 PM
|
#63 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by ETbyrne
Honestly, there is a lot I dislike about most of the frameworks out there, but the two biggest issues I have are:
1) They are huge and bloated. There is no reason why a framework should be over 2MB in size. I know they boast a lot of extras, but I just want the basics. I'm too impatient to wade through all of that extra stuff!
2) They are complicated. They make it way to hard to do things that would otherwise be simple and straight forward.
Maybe. Truth be told doing so would just be another step I have to take. I know changes are happening pretty rapidly and it is hard to keep up with all of them, but things should slow down significantly once the framework is released to the general public.
|
thanks.
What is your long goal plans for Dingo? Do you want it to be the de facto framework for PHP?
This may sound like a dumb question so forgive me, but does your framework follow any specific design pattern?
How many contributors do you have so far? How long has it been around?
|
|
|
|
04-18-2009, 09:24 PM
|
#64 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Quote:
|
What is your long goal plans for Dingo? Do you want it to be the de facto framework for PHP?
|
That would be nice, so yeah I'm gonna shoot for that. In the end it's the users that will decide if that ever happens
Quote:
|
This may sound like a dumb question so forgive me, but does your framework follow any specific design pattern?
|
It loosely follows the MVC pattern.
Quote:
|
How many contributors do you have so far? How long has it been around?
|
Just me and a few very helpful people that have posted here. I have been using it since the fall.
|
|
|
|
04-18-2009, 09:50 PM
|
#65 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by ETbyrne
That would be nice, so yeah I'm gonna shoot for that. In the end it's the users that will decide if that ever happens
It loosely follows the MVC pattern.
Just me and a few very helpful people that have posted here. I have been using it since the fall.
|
Well good luck to you and your project. I wish I were advanced enough to offer insights, suggestions or even trying it out.
Hopefully I can get up to speed quickly enough to begin using frameworks and getting a good understanding about them.
Do you know how cakePHP got started? is it open source?
Was it just a bunch of guys getting together or is it funded by some corporation?
|
|
|
|
04-19-2009, 10:48 PM
|
#66 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
New version of Dingo uploaded. This time I added optional error logging, useful for tracking down pesky errors on a live site.
|
|
|
|
04-20-2009, 02:46 PM
|
#67 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
ETbyrne- Can I ask you how you did the dynamic routing? And how did you make the error logging thing? I'm kinda interested to learn
__________________
|
|
|
|
04-20-2009, 05:00 PM
|
#68 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
For the error logging just see system/core/DingoErrors.php
The dynamic routing is kinda complex and I don't really care to explain it... 
|
|
|
|
04-20-2009, 07:35 PM
|
#69 (permalink)
|
|
The Addict
Join Date: Jun 2008
Posts: 335
Thanks: 2
|
Dynamic routing is actually not as complex as one might think if one only uses straight regex and not wild cards.
Let us say we use a URL object with stores all data after index.php so for example
index.php/store/category/10293/animals/fluffybird
The url object would store store, category, 10293, animals, fluffybird within an array or an object.
Let us say we have this
index.php/category-1029-animals-fluffybird.html
and regex like this
/cagtegory-(.*[0-9)-(.*[a-zA-Z)-(.*[a-zA-Z0-9])\.html/
=>
/store/category/$1/$1/$1
Before we call the controller method, we call the routing object which simply scrolls though an array of regular expressions and if they match my routing object produces an array like this
controller =>store
method =>category
than the arguments are 10293, animals, fluffybird in an arguments array. My routing object than goes a step further and injects these into the url object replacing the single array item
with
category-10293-animals-fluffybird
with an array that looks like this
category, 10293, animals, fluffybird. After this, the returned controller/method array is used in place to call the controller method
This is part of the function that I use to route
PHP Code:
while( (list($route, $val) = each(self::$route)) && $continue == true ) { if( in_array($route, self::$isRegex) ) { if( preg_match($route, $urlString) ) { $urlString = preg_replace($route, $val, $urlString); $continue = false; } }else{ $regex = '/' . $route . '/'; if( preg_match($regex, $urlString) ) { $urlString = preg_replace($regex, $val, $urlString); $continue = false; } } } //now break the url string again and return the controller, the function, and the variables $return = array(); $urlString = explode('/', $urlString); $url = count($urlString)-1; //Build an array with our controller, method, and varaibles for input $return['controller'] = $urlString[0]; $return['method'] = $urlString[1]; $urlObject = Factory::getLibrary('url'); $urlObject->feed(0, $urlString[0]); $urlObject->feed(1, $urlString[1]); for($i = 2; $i <= $url; ++$i) { $return['vars'][] = $urlString[$i]; $urlObject->feed($i, $urlString[$i]); } Factory::feedObject($urlObject); return $return; }
|
|
|
|
|
The Following User Says Thank You to Enfernikus For This Useful Post:
|
|
04-21-2009, 07:15 PM
|
#70 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
New version of Dingo uploaded. This time I added a real database library, but it only has a MySQL driver at the moment. Check it out and tell me what you think!
|
|
|
|
06-09-2009, 04:16 PM
|
#71 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Don't worry guys this project is NOT dead! I'm just taking a little break from it while I get ready for my national level computer networking competition that takes place June 22-27 in Kansas City.
|
|
|
|
06-30-2009, 07:01 PM
|
#72 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
I just uploaded a new mini-release to the site with some code cleanup and a few bug fixes.
|
|
|
|
07-27-2009, 05:14 PM
|
#73 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
ALPHA testing is now over! The Dingo website is now officially offline until the first BETA release. In the meantime you can check out the design for the new site!
--> http://www.dingocode.com
|
|
|
|
07-29-2009, 03:45 PM
|
#74 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
|
Have a couple of questions and comments for you regarding this...after reading.
Templates / View
----------------------------------------------
You stated that templates can be called which will auto-load a group of "templates". To my understanding templates are just grouped views or is it an entire page layout combined into one file? Docs are not up so I cant read on it....
What I am confused about is you stated "Perhaps I should just get rid of views entirely"
How are "templates" as I understand "a group of views" going to replace views? It seems illogical and backwards. If you want the ability to change the layout of a "view" on the fly using templates, would it not be easier to have the View be intelligent enough so, you can set a "theme" to use, and then template files can be pulled from that "themes" directory, if it's not there pull the default view located with a module. With pr without following the MVC Pattern the "view" is virtually a must have for any application that will be organized. Forcing the loading of groups of templates is counter-productive and memory consuming.
Example of this:
// Directory Structure
Code:
|--views
|--index
|--home.phtml
|--left.phtml
|--themes
|--my_theme
|--index
|--home.phtml
PHP Code:
// init file $this->setTheme('my_theme'); // As an example $this->view->load('index/home'); $this->view->load('index/left'); // Would pull out index/home.phtml from my_theme/ and left would be pulled from views/
Maybe I have a misunderstanding?
Database
---------------------------------
You stated you have a database library is this using PDO?
Does this support any type of query building?
Sessions
--------------------------------
I haven't seen anything about session handling in the topic, how does this handle sessions? Do you have the ability to create concurrent sessions or is everything cookie based?
Routes
------------------------------
$route['one/([a-zA-Z]+)/([0-9]+)'] = 'query/$1/$2';
How does this get sent to the controller, and what happens when I want to skip the controller and just process a view file?
Is this supported?
You said the route system is to complex to explain, could you elaborate a bit more on this? How is it complex to compare Regex strings to mapped layers?
Error Handling
------------------------------
Can I log errors to a file automatically?
How are errors handled after production is there any notification system, alert monitor etc in place for encountered errors after I send a application live?
How are errors handled during development, is there any customization to exceptions thrown or errors encountered?
ACL
-----------------------------
Is there a built-in ACL system, even a simple skeleton for one would suffice
|
|
|
|
07-29-2009, 08:39 PM
|
#75 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Hey ioan1k, I'm glad you have so much interest in my framework. :)
Templates / Views
Templates are exactly like views in Dingo, they are just organized in a slightly different way. Templates aren't meant to replace views, you can still use views if you want.
Themes are just a group of templates that are organized into a folder in the theme directory (not included in any public releases so far, this used to be called the 'templates' dir). Here is an example usage of views:
PHP Code:
// Load view located at views/sub_dir/wow.php $this->load->view('sub_dir/wow');
This is an example usage of Themes/Templates:
PHP Code:
// Set current theme to 'amazing' $this->load->theme('amazing');
// Try to load template located at themes/amazing/sub_dir/wow.php // If template is not found try to load it from themes/default/sub_dir/wow.php $this->load->template('sub_dir/wow');
The interchangeability of themes makes it a little easier to build theme-able content management systems, something that would be a little messy if done with views.
Database
Currently the framework does not support this, but it is in the works and will be included with the first public BETA.
Sessions
There is not currently any session support, only cookies at this point. I'm going to look further into this and I'm planning on including a user authentication class with the BETA which will probably handle that sort of thing.
Routes
When a page request is sent to dingo it checks to see if that page matches any records in the $route array. If it finds a matching route it loads it. You will not be able to skip the controller and just process a view.
I simply said I didn't want to explain the routing and I'm not obligated to do so. It's not that it's too complex for me to explain, I just don't want to. When the code is publicly available again you can take a look at it for yourself.
Error Handling
Automatic error logging is supported. You may customize the error view files (located in the errors folder) to send you an email/sms/whatever if you want to (the default action is that the errors are just displayed).
Dingo handles errors very nicely (thanks to Kalle). You can customize the way errors and exceptions are displayed by editing the error view files.
ACL
Could you explain to me by what you mean by an access control list system? I'm familiar with ACLs (and configured them many times) on routers, but I've never heard of them being used in a web application framework.
If you have any more questions don't hesitate to ask! :)
|
|
|
|
07-29-2009, 09:39 PM
|
#76 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
|
I'm sorry,
I am not trying to flame but present a professionally based opinion, and I am not interested in your framework at this point...
I still do not see the point in adding an additional method that serves the same purpose. Make the load->view intelligent enough to know a theme has been set.
Quote:
|
I'm familiar with ACLs (and configured them many times) on routers, but I've never heard of them being used in a web application framework
|
If you are going to write a User Authentication Class ... a ACL system would almost be mandatory for a framework, with that said; a ACL system is a very complex system to develop for use with a framework with no understanding of how they work ... I wish you Good luck.
Quote:
|
I simply said I didn't want to explain the routing and I'm not obligated to do so. It's not that it's too complex for me to explain, I just don't want to. When the code is publicly available again you can take a look at it for yourself.
|
You are never going to get much public support with comments like that. A Developers time is money why waste money looking over code someone else wrote ... many developers DO see it as your obligation to explain your code if you want us to use it.
Quote:
|
Automatic error logging is supported. You may customize the error view files (located in the errors folder) to send you an email/sms/whatever if you want to (the default action is that the errors are just displayed).
|
The errors are just displayed, there is no way to disable this?
Also, the class Kalle has posted is a very simple error handler ... what about exceptions?
I see you have put a lot of work into this project and I do respect that, but I do not see any potential for me to even consider downloading, let alone looking at the source code to find out how something works...
|
|
|
|
07-30-2009, 02:37 AM
|
#77 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
Quote:
|
I still do not see the point in adding an additional method that serves the same purpose. Make the load->view intelligent enough to know a theme has been set.
|
That is your opinion and you are entitled to it. I however think that would complicate things, something this framework strongly aims at not doing.
Quote:
|
a ACL system is a very complex system to develop for use with a framework with no understanding of how they work ... I wish you Good luck.
|
May I remind you that I'm one of the top computer networking students in the country (number 7 to be exact). I know what an ACL is and how they work in a networking environment. Don't act like I'm stupid because I'm not as familiar with your use of networking terminology. You complain because I don't want to walk you through a bunch of code that you probably aren't even interested in, but you can't answer a simple question yourself.
Quote:
The errors are just displayed, there is no way to disable this?
Also, the class Kalle has posted is a very simple error handler ... what about exceptions?
|
The way errors are handled can be modified by editing the error view files. Critical errors will always stop execution of the PHP script and remove anything in the output buffer (besides what the error view puts in it).
Quote:
|
You are never going to get much public support with comments like that. A Developers time is money why waste money looking over code someone else wrote ... many developers DO see it as your obligation to explain your code if you want us to use it.
|
And those developers are unreasonable in thinking I have time to explain every little thing in extreme detail. You do not need to know how the code that does the routing works in order to use the framework, and you don't want to look at the code yourself, so I see no point in putting in the time to answer such a question. That's what code comments are for.
Quote:
|
I see you have put a lot of work into this project and I do respect that, but I do not see any potential for me to even consider downloading, let alone looking at the source code to find out how something works...
|
I must say I find your professional opinion to be a very rude one. It should be noted to everyone here that ioan1k has his own framework, this is why he is so quick to give mine such a biased review without even seeing any code.
Btw I checked out the ACL portion of your framework and it's not really complicated at all. Actually it's quite simple compared to other aspects of a framework.
|
|
|
|
07-30-2009, 10:59 AM
|
#78 (permalink)
|
|
Super Moderator
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
|
ETbyrne, what made you give it the name dingo ?.. if i may ask..
|
|
|
|
07-30-2009, 12:08 PM
|
#79 (permalink)
|
|
The Contributor
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
|
I am basing my information on the 5+ years experience I have working with PHP frameworks, this has nothing do with anything I have written.
Quote:
|
The way errors are handled can be modified by editing the error view files. Critical errors will always stop execution of the PHP script and remove anything in the output buffer (besides what the error view puts in it).
|
Exceptions can be handled in the same manner as any other error and in such a way to be passed to a view.
Quote:
|
And those developers are unreasonable in thinking I have time to explain every little thing in extreme detail.
|
I do not find wanting to understand the architecture for Route System unreasonable.
For your view it would not complicate things to add the theme based information into the load->view, it could simply be done by adding a if statement to prep end this path information before you pull a view script.
Quote:
|
Btw I checked out the ACL portion of your framework and it's not really complicated at all. Actually it's quite simple compared to other aspects of a framework.
|
Is this for the LOC's not to get into this discussion but it performs the following...
1. Parents Checks (if exists) (Checks 1-4 For each Parent)
2. Level
3. Role Specific Allow & Deny Permissions (if set)
4. User Specific Allow & Deny Permissions (if set)
It took 3 weeks development for a final version, I would like to know how you base this information?
I was not being rude to you at any point ... if this is how you see it, I'm sorry you cannot take it.
|
|
|
|
07-30-2009, 12:49 PM
|
#80 (permalink)
|
|
The Addict
Join Date: Jun 2008
Posts: 335
Thanks: 2
|
ET, I also checked out his ACL system and while simple-looking is very robust, it's the mark of good programming to make something which is useful and preforms a complicated task ( Full fledged ACL Systems are indeed complex ) and yet still remain simply written. I don't really even need to see the commenting to understand the flow, the same cannot be said about many other scripts.
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|