Page 2 of 2

Re: Here guys - adeframework.com

Posted: Fri Jun 13, 2008 7:03 pm
by alex.barylski
I am not a fan of the $_KERNEL object, nope. :)

Honestly though, it's not just the name it's the entire object. I just personally do thinigs differently.
Creating a site with it using MVC would be trivially easy
Can you show a complete example, like an trivial address book???

I can't say I see how your framework would be used with MVC. Certainly not model 2 anyways.

Controllers (for me anyways) are the most interesting part of a framework and I see nothing of the sorts in your codebase. It looks like it would be more suited for a transaction script style application.

Does $_KERNEL load controller classes if they reside in the classes directory? Are you autorun.php files what would be considered controllers?

Re: Here guys - adeframework.com

Posted: Sat Jun 14, 2008 1:02 am
by Benjamin
Here is a trivial address book example.

The first thing to do is create a template for it.

Create a folder in the templates directory called addresses. Inside of that are two files, style.css and template.php.

Here is the code for them.

Code: Select all

 
.error {
    font-weight: bold;
    color: #ff0000;
}
 
.message {
    font-weight: bold;
    color: #135e00;
}
 
form {
  display: inline;
}
 
table.recordset {
  border-width: 1px 1px 0px 0px;
  border-color: #000000;
  border-style: solid;
}
 
table.recordset td, th {
  border-width: 0px 0px 1px 1px;
  border-color: #000000;
  border-style: solid;
  text-align: center;
  padding: 5px;
}
 

Code: Select all

 
<html>
<head>
    <title><?php echo adef_tdata('title'); ?></title>
    <?php echo adef_tdata('meta_tags'); ?>
    <base href="<?php echo adef_tdata('ADEF_ROOT_URL'); ?>" />
  <link rel="stylesheet" type="text/css" href="templates/addresses/style.css" media="screen" />
</head>
 
<body>
    <?php echo adef_tdata('navigation_menu'); ?>
 
    <?php if (adef_tdata('subheader')) { ?>
      <div class="subheader"><?php echo adef_tdata('subheader'); ?></div>
    <?php } ?>
    
    <?php echo adef_tdata('system_messages'); ?>
 
    <?php echo adef_tdata('main_content'); ?>
</body>
</html>
 
Now we need to tell the framework to use the template. We will be placing the addresses example in a folder called addresses, so in order to tell the framework to use the addresses template whenever we access that folder we must add a line to the config file. While you have the config file open, set a mysql username and password, as well as a database to use.

Code: Select all

 
$AddTemplate['addresses'] = 'addresses/template.php';
 
Next create a folder called addresses inside of the htdocs folder. All of the following files will be placed there.

The first file I'm going to create is the autorun.php file. In this file I am going to set the page title and create a small navigation menu.

Code: Select all

 
<?php
# Set the page title
$_KERNEL->page_data->set('title', 'Address Book');
 
# Create the navigation menu
$navlinks = array('addresses/'       => 'View',
                  'addresses/add'    => 'Add Address');
 
$_KERNEL->menus->set_menu('navigation_menu', $navlinks, "&nbsp;&nbsp;|&nbsp;&nbsp;");
 
Next I create index.php. This will be the page that displays the address records after we have saved them.

Code: Select all

 
<?php
$records = $_KERNEL->db->turbo_results("select * from addresses");
?>
 
<h2>My Addresses</h2>
 
<?php if (is_array($records)) { ?>
  <table cellspacing="0" class="recordset">
    <tr>
      <th>Name</th>
      <th>Address</th>
      <th>Edit</th>
      <th>Delete</th>
    </tr>
    <?php foreach ($records as $address) { ?>
      <tr>
        <td><?php echo "{$address['last_name']}, {$address['first_name']}"; ?></td>
        <td><?php echo $address['address']; ?></td>
        <td><a href="addresses/edit?address_id=<?php echo $address['address_id']; ?>">Edit</a></td>
        <td>
          <form name="delete_<?php echo $address['address_id']; ?>" action="addresses/delete" method="post">
            <input type="hidden" name="address_id" value="<?php echo $address['address_id']; ?>" />
            <input type="submit" value="Delete" />
          </form>
        </td>
      </tr>
    <?php } ?>
  </table>
<?php } else {
          $_KERNEL->status->error("There are no addresses.");
      }  
?>
 
Now I'll create a page to add records. This page will be called add.php. The page title is set to "Address Book" in the autorun file, however I'm going to append a string to it in the code so that it will now say "Address Book - Add new address".

Code: Select all

 
<?php
$_KERNEL->page_data->append('title', ' - Add new address');
 
if (post('do') == 'save')
{
    $data = array('first_name' => post('first_name'),
                  'last_name'  => post('last_name'),
                  'address'    => post('address'));
    
    $_KERNEL->db->insert($data, 'addresses');
    
    $_KERNEL->status->message("The address has been saved.");
 
    redirect('addresses/');
}
?>
 
<h2>Add Address</h2>
 
<form name="add" action="addresses/add" method="post">
  First Name: <?php echo input('first_name'); ?><br />
  Last Name: <?php echo input('last_name'); ?><br />
  Address: <?php echo input('address'); ?><br />
  <input type="hidden" name="do" value="save" />
  <input type="submit" value="Save Address" />
</form>
 
Now we need a page that will edit records. This page will be named edit.php.

Code: Select all

 
<?php
$_KERNEL->page_data->append('title', ' - Edit an address');
 
if (post('do') == 'save')
{
    $data = array('first_name' => post('first_name'),
                  'last_name'  => post('last_name'),
                  'address'    => post('address'));
    
    $_KERNEL->db->update($data, 'addresses', array('address_id' => '= ' . post('address_id')));
    
    $_KERNEL->status->message("The address has been saved.");
 
    redirect('addresses/');
} else {
    $_POST = $_KERNEL->db->turbo_row("select * from addresses where address_id = '" . esc(get('address_id')) . "'");        
}
?>
 
<h2>Edit Address</h2>
 
<form name="add" action="addresses/edit" method="post">
  First Name: <?php echo input('first_name'); ?><br />
  Last Name: <?php echo input('last_name'); ?><br />
  Address: <?php echo input('address'); ?><br />
  <input type="hidden" name="address_id" value="<?php echo post('address_id'); ?>" />
  <input type="hidden" name="do" value="save" />
  <input type="submit" value="Save Address" />
</form>
 
And finally, delete.php so we can delete records.

Code: Select all

 
<?php
$_KERNEL->db->query("delete from addresses where address_id = '" . esc(post('address_id')) . "'");
 
$_KERNEL->status->message("The address has been deleted.");
 
redirect('addresses/');
 
Here is the table scheme. Name your table addresses and create it in the database you have already selected in config.

Code: Select all

 
CREATE TABLE IF NOT EXISTS `addresses` (
  `address_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  PRIMARY KEY  (`address_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 

Re: Here guys - adeframework.com

Posted: Sat Jun 14, 2008 2:56 am
by onion2k
astions wrote:This is an awesome framework. Creating a site with it using MVC would be trivially easy, the template system is easy to use and it's got a lot of other things going for it.

I'm surprised you guys aren't jumping on it.
You're not demonstrating the value of learning it. We only have your word that it's awesome unless we invest time figuring it out. That's one of the main problems developers have trying to market any kind of code library. Even the relatively mainstream PHP ones like Smarty, ADODB Lite and Swiftmailer weren't really picked up by other people until tutorials and working examples started appearing.

To be honest, for most developers writing the supporting marketing stuff is actually more of a challenge than writing the code. It definitely is for me.

EDIT: I always seem to reply before reading the next page. I see your example there. That doesn't look too bad actually. Couple of questions ... You said it'd be easy to write MVC apps with this library, so why didn't you with this address book thing? How easy is it to add validation to the editing form?

Re: Here guys - adeframework.com

Posted: Sat Jun 14, 2008 4:02 am
by Benjamin
onion2k wrote:Even the relatively mainstream PHP ones like Smarty, ADODB Lite and Swiftmailer weren't really picked up by other people until tutorials and working examples started appearing.
I agree completely. This framework is fully functional but it has a long way to go. I don't feel it's to the point where I can start writing documentation for it. A few of the things I want to do:

1. Change the database classes so that they extend an abstract class.
2. Design and add a resource locator.
3. Complete the caching system.
4. Beef up the template engine, possibly creating macro templates for things such as boxes, navigation menus etc.
5. Hammer out exactly how the error logging feature will work, including what should and shouldn't be logged.
6. Hammer out exactly how internal errors are handled and sent to the browser and how the developer can control this. (ie database connection failed, missing view etc)
7. Add PHPDoc comments to the entire code base
8. Hammer out exactly what role the kernel should play and refactor it specifically for this purpose.
9. Complete the auto validation code writer which will create 80% to 95% of validation code for you based on a db table schema. (50% done)
10. Complete the development panel which will allow you to easily view any errors (PHP) encountered and view a log of the page request. (50% done)
11. Complete a scaffolding system which will write 80% to 95% of a form page (create, retrieve, update, delete) with the validation code, so all you have to do is go in and modify it to suite your needs. Done correctly this will save insane amounts of time.
12. Write documentation for every class and the framework in general.
13. Tons of little things.

I can't do this all by myself though. I feel like I've got the ball rolling and have some very good concepts that can be improved upon to make this the best framework.
onion2k wrote:I see your example there. That doesn't look too bad actually.
Thank you!
onion2k wrote:Couple of questions ... You said it'd be easy to write MVC apps with this library, so why didn't you with this address book thing?
Honestly I'm not a big fan of MVC for web development. It slows me down. I'm going to research this and post back about how it can be added to the framework. Even when I worked on design teams it was the programmers who were sent the templates for integration.

At this point what I am thinking is that you would use an autorun file to capture a request. See http://adeframework.com/examples/intercept

Then you can send those (the url pieces) to a class which would check the resource locator to verify their existence before executing them.

onion2k wrote:How easy is it to add validation to the editing form?
I think it's very simple and there are numerous ways to do it. I normally use try catch blocks or a database validation class specific to the form but that's really up to you. You can still use new classname() to create instances of your own classes. They will be autoloaded as long as they are the class directory. The get and post functions simply return the value of that element in the $_POST or $_GET array. If you change a post var it will change the value returned by the post function.

In this example I added validation code to the add.php page from the example I posted earlier.

Code: Select all

 
<?php
$_KERNEL->page_data->append('title', ' - Add new address');
  
if (post('do') == 'save')
{
    try {
        if (strlen(post('first_name')) < 2)
        {
            throw new Exception("Please enter a valid first name.");
        }
        
        # you can also use post of course
        if (strlen($_POST['last_name']) < 2)
        {
            throw new Exception("Please enter a valid last name.");
        }
        
        $data = array('first_name' => post('first_name'),
                      'last_name'  => post('last_name'),
                      'address'    => post('address'));
       
        $_KERNEL->db->insert($data, 'addresses');
        
        $_KERNEL->status->message("The address has been saved.");
      
        redirect('addresses/');
    } catch (Exception $e) {
         $_KERNEL->status->error($e->getMessage());
    }
 }
 ?>
 

Re: Here guys - adeframework.com

Posted: Sat Jun 14, 2008 7:48 pm
by alex.barylski
I'm looking over your code example, and while I don't think your framework would meet my own requirements as effectively as my own, I htink you should certainly open source it. It does solve many problems faced by many developers.

There is little point in my just saying why your framework wouldn't work for me, so I will try and draw on examples of where your framework would cause more trouble for me than my own solution. If you/we gain anything, hopefully it'll be indications as to what you need to document in order to get new developers up and running sooner.

Templates are a great place to start.

Someone just coming into your framework (like myself) would be confused by the use of the various functions used inside the template.

adef_tdata

I found it located at 'includes/core/functions.php'

Code: Select all

function adef_tdata($key)
{
    $_KERNEL = kernel::get_instance();
    return $_KERNEL->page_data->get($key);    
}
 
It's a wrapper, and now I have to find the class for KERNEL. I find KERNEL and look at the class expecting to find a object called page_data but I see nothing. From quickly looking at KERNEL I can see that it loads and caches classes automagically and that page_data is is not a statically declared member variable.

From here, I do a search for the class 'page_data' and can now begin to figure out what that template function did.

Looking at page_data I'm slightly confused as to how that fits into the template.

After some poking around I see that index.php is invoked through mod_rewrite and that the whole process is kicked off by a call to:

Code: Select all

$_KERNEL->webpage->request(get('ADEF_GET_RESOURCE'));
Confused by what appears to be a constant being passed in I go looking for the define and a few minutes later realize it's actually a GET variable capitalized. Personally I am extremely strict about conventions and standards, I never capitalize anything but constants and thus consider that bad practice. Although you probably did that to avoid possible name clashes with custom/user GPC variables this is still bad practice IMHO. Besides what if someone designs a GET form with a field name labeled ADEF_GET_RESOURCE?

Now I'm looking into compiler->build()

Again, I'm strict about conventions and because of that, your code confuses me.

In class webpage the request() method is passed a $webpage variable which is passed to compiler->build() but the implementation uses the variable name $request.

While I aagree that some times functional context sets the name of a variable, in this case, I think I would stick to $request in both methods. It's just easier to follow when just entering the codebase and stepping through it trying to learn everything.

Your compiler class is to complex for my use. I can't even offer suggestions as to how to refactor it, cause I lack a solid understanding of the rest of the framework, but that is way to many lines. In that one file, you have the same funcitonality as I do in my:

1) Request object
2) Response object
3) View object
4) Template object
5) Caching object
6) Controller object

It's to much going on in one place, that without a long period of time spent learning how the code works as well as learning how it affects the rest of the code base, makes for an unplesant learning experience. Honestly I would be afraid to change anything because of the heavy dependency on $_KERNEL and it's objects.

That is where I stopped trying to learn your framework internals, unfortunately that seemed to be the heart of the framework right there, as whatever it returns is sent to the browser.

The implementation of a framework is of little interest to the average developer, so lets' skip anything above you find non-constructive and get back to the example you shown. :drunk:

Templates:

Your template is typical, same technique as my own, using PHP. Great move.

Problem:

How does that adef_tdata turn out the properly formatted META tags? Makes me think that:

1) The HTML is hardcoded somewhere in a function - yuck
2) The script author is responsible for adding complete HTML meta tags - double yuck

Same concern applies to the navigation_menu. Where is the HTML required to create them? If I need to change the menu to include small icons next to the next or I want to remove the <a> link and use javascript instead, how do I do that??? The HTML is not in the template where I would expect to find it and following the code is difficult and time consuming because of the dependencies and amount of indirection when travelling your codebase.

Now I"ll jump on your actual scripts.

index.php has several aspects that would make me cringe if I had to work with it.

1) You have a SQL query in the same file as your HTML template. I cannot state enough how much I hate that and how it results in buggy code.
2) You have inline SQL, I equally hate that. When people develop software this way, in any application beyond something trivial, you get major code duplication and when one section of an application changes the other queries break, etc, etc.

Of course there is nothing stopping someone from using a model object to centralize SQL and such, but there is nothing influencing or suggesting I should either and people are lazy and will take the easy way out.

What is the status error in the templates all about?

I don't like seeing anything but presentation logic in my templates. Strict discipline required, but it keeps everything clean.

In my framework, setting an error message happens in my controllers and no where else.

edit.php looks like a typical transaction script. You have your basic SQL queries, conditional logic testing for whether you should save or not and finally you dump the results to screen via a template.

Re: Here guys - adeframework.com

Posted: Sun Jun 15, 2008 2:38 pm
by koen.h
astions wrote:So I guess what I'm getting here is that a lot of you aren't fond of the $_KERNEL? Would it be better to call it something else?
A code smell by any other name would smell as bad.

I haven't looked at your code but reading the comments they don't like the kernel class because it's not that good design-wise. It has too much responsibilities and has too many ties with other classes.

Re: Here guys - adeframework.com

Posted: Mon Jun 16, 2008 1:06 am
by Benjamin
Hockey wrote:I think you should certainly open source it. It does solve many problems faced by many developers.
I'm leaning towards it.
Hockey wrote:Someone just coming into your framework (like myself) would be confused by the use of the various functions used inside the template.

adef_tdata
As you found out it's a wrapper for the page_data class. It's sole purpose is to retrieve values from the page_data class assigned by your PHP code. The value names are arbitrary, so they can be anything you'd like.

$_KERNEL->{something_here} is very simple. {something_here} is simply a class name. The the code for the class name will be in the core classes directory, or the user class directory if it is something you have added.
Hockey wrote: After some poking around I see that index.php is invoked through mod_rewrite and that the whole process is kicked off by a call to:

Code: Select all

$_KERNEL->webpage->request(get('ADEF_GET_RESOURCE'));
Confused by what appears to be a constant being passed in I go looking for the define and a few minutes later realize it's actually a GET variable capitalized.
Perhaps this could be renamed to request_resource?
Hockey wrote: Now I'm looking into compiler->build()

Again, I'm strict about conventions and because of that, your code confuses me.
I wouldn't expect anyone to understand that, nor should they need to. The intentions are to design the system with full flexibility that does not require knowledge of the internals.

Hockey wrote: In class webpage the request() method is passed a $webpage variable which is passed to compiler->build() but the implementation uses the variable name $request.
$request would be a more appropriate name in the webpage class for that variable.
Hockey wrote:It's to much going on in one place.
The design of the system requires this so autorun and php files share the same memory scope. Also, due to logic requirements, it most likely is not possible to change it. There really isn't a need to modify the compiler.
Hockey wrote:How does that adef_tdata turn out the properly formatted META tags? Makes me think that:

1) The HTML is hardcoded somewhere in a function - yuck
2) The script author is responsible for adding complete HTML meta tags - double yuck
Neither, meta tags are controlled by the page_meta class and assigned to the template when the compiler is done.
Hockey wrote: Same concern applies to the navigation_menu. Where is the HTML required to create them?
That is something I explain here. Very easy. Not perfect.
Hockey wrote: index.php has several aspects that would make me cringe if I had to work with it.

1) You have a SQL query in the same file as your HTML template. I cannot state enough how much I hate that and how it results in buggy code.
2) You have inline SQL, I equally hate that. When people develop software this way, in any application beyond something trivial, you get major code duplication and when one section of an application changes the other queries break, etc, etc.
I disagree on both of those points. This isn't an MVC layout. Each page contains it's own page specific code at the top. Anytime you make schema changes your going to have the change the queries, it doesn't matter where they are.
Hockey wrote: Of course there is nothing stopping someone from using a model object to centralize SQL and such, but there is nothing influencing or suggesting I should either and people are lazy and will take the easy way out.
The pages you create are a blank canvas. I want the framework to be transparent so you the developer can do as you wish.
Hockey wrote: What is the status error in the templates all about?
When you set an error message if there is an error during form submission etc. With the framework you can set one which will be displayed on that page, or you can set one and redirect causing it to be displayed on the next page. That is one of my favorite features.

Re: Here guys - adeframework.com

Posted: Mon Jun 16, 2008 1:13 am
by Benjamin
I don't think that I effectively communicated the value that I see in my framework to the community. Consequently a majority of you have judged it and come to a conclusion based on the fact that the code base is not fully OOP.

I want to stress that this fact alone does not mean that the framework as a whole is of poor quality and is not useful. While I would love to say that the codebase is perfect, the fact is that this was written by one person, me. This is real world code that works very well for me. I can also say that:
  1. The code base is organized. It was designed so that each class as a whole performs an action, and the methods of each class break a specific action into organized pieces.
  2. The code base is very efficient. Using the kernel drastically decreases the amount of PHP memory usage by reusing classes. Response time is also surprisingly fast.
  3. The code base is very robust and error free. There are very few bugs anywhere within the code base. I think there is one in the pagination class where page counts are sometimes off by 1. There are very few points of failure (db connection, memcache, write permissions, etc) and these can be handled fairly easily.
  4. There is very little duplication. The kernel and the auto load function share a snippet that checks for file existence and the mysql and mysqli classes share some of the same functions. Other than that any changes can generally be easily made in one place.
  5. Anything you need is available at all times from anywhere within the code base but is not loaded until it is explicitly required.
The reason I wrote this is to save myself time. This framework saves me time because:
  1. I can create a site wide template which will be used for the entire website. I don't have to specify what “view” or template to use in every model.
  2. I can create a new page and immediately start writing code without having to worry about including files or initializing resources.
  3. Creating simple static pages doesn't require writing a model and specifying a view.
  4. I can easily map urls with a capture request placed into an autorun file.
  5. I can set a status message such as, “You must be logged in” and then redirect to another page. This saves me time because I don't have to bother placing a message code in the url and writing code to display it on the next page.
  6. I can easily insert and update database records simply by placing the fields into an array and calling the database class.
  7. The buffering system allows the sending of headers/redirects from anywhere. No data is sent to the browser until the system has completed processing your PHP code.
  8. I can change the destination page displayed without redirecting.
  9. I can easily assign menu's, meta-tags and templates on a per-directory and per page basis.
  10. I can move an entire site to a different domain name or different subdirectory on the server without having to change anything at all.
  11. Wrapper functions such as get, post, input, esc etc save loads of typing for commonly used code snippets or tasks.
There are other benefits of using the framework that I am forgetting.

Re: Here guys - adeframework.com

Posted: Mon Jun 16, 2008 4:17 am
by Eran
I want to stress that this fact alone does not mean that the framework as a whole is of poor quality and is not useful.
I don't think that anyone is saying that. The code base is very organized and it looks to be efficient doing what it does. However for most people here, the workings are too magical as they all route back to the $_Kernel object with its magic functions, making hard to figure out where the actual implementation is. Your library is also hard to extend, due to the large dependencies on the $_Kernel object and the flat class structure. For you its obviously much easier since you wrote the code base and are familiar with it inside and out.

You might want to restructure a little to make the components of the framework standalone, and then put them back together. If people could mix and match your components without the $_kernel dependency, your framework value to others would increase by a large margin.

Re: Here guys - adeframework.com

Posted: Mon Jun 16, 2008 4:59 pm
by alex.barylski
I don't think that I effectively communicated the value that I see in my framework to the community. Consequently a majority of you have judged it and come to a conclusion based on the fact that the code base is not fully OOP.
Initially I did, but I slowly began to see what it was you were trying to do with it.

The thing is, when someone says "framework" I think MVC because 99% of frameworks are based on MVC or MVP.

Again, I would say your codebase is more like a web page builder/assembler. It is similar to some CMS I have used in the way they present the web page to end users. It's a direction a lot of people head in when they first start using OOP, it s a common solution. I did something myself a few years ago when I built my first CMS. I am willing to bet if you continued studying MVC and Zend, etc you would eventually follow a more MVC approach though.
I want to stress that this fact alone does not mean that the framework as a whole is of poor quality and is not useful. While I would love to say that the codebase is perfect, the fact is that this was written by one person, me. This is real world code that works very well for me. I can also say that:
Not poor quality no. For the most part it's simple, but you would need to document more of the internals as I did get quickly confused in your compiler class. Lets face it, simplicity is always best. If a new developer can come in and begin understanding everrything within minutes, the code is in great condition.

Code is easier to read and comprehend when:

1) The dependencies are minimized and/or documented well in external documentation -- not inline comments
2) The source files are not over whelmingly verbose. I aim for 100 lines max anything more and I take that as a sign to start refactoring
The code base is organized. It was designed so that each class as a whole performs an action, and the methods of each class break a specific action into organized pieces.
For you it's organized. You wrote it. For me, it was confusing although I've seen worse. The relative flatness of the file structure made it way easier.

When you develop software using a MVC you basically give all other developers who are familiar with front controller, model, views, etc a solid starting point without requiring them to read any docs or you to write any.

There is one problem I have seen with most MVC implementations. That is, everyone has a different understanding of what MVC should consist of, exactly. So without docs, your still going to take some time to learn the unwritten conventions or standards set forth in the framework or application.

I have seen some applications have code in their Views or Models that I would have in my controllers, etc. I have also seen MVC apps where to much code was forced into the controller. So while the learning isn't eliminated it is reduced, because at least the vocabulary is there.

When I enter your framework code, the compiler class was too complex for my tastes -- and although that should be of little concern to anyone using your codebase, it is a concern of mine, because if something breaks while using it and your response is to slow I need to fix it myself and I can't wait days, so I need to get my hands dirty.

This is probbably the biggest crux introduced by open source software. When I worked in C/C++ when a library was broken, you just dealt with it and so did you bosses and clients. With open source, your almost expected to understand the entire source tree. Bah.
There is very little duplication. The kernel and the auto load function share a snippet that checks for file existence and the mysql and mysqli classes share some of the same functions. Other than that any changes can generally be easily made in one place.
I judge applications or codebases more on the amount of code reuse than I do code duplication. There will no dought be code duplication, it's when entire functions could be easily refactored into a single function that bothers me. When I see a codebase that promotes A LOT of code reuse, I'm generally more at ease in playing with the code.

While I agree that your framework does all those things you mention, so to does an MVC framework, and then some...

With the exception of having to create View/Model for static pages. I don't nessecary need a Model for static pages, nor do I need a View or a template, but it's good practice and I'll tell you why. Static pages often "eventually" require some dynamic data. Having those components in place already (when they are empty they don't exactly take much processing power) makes turning the static page into something mroe dynamic a snap of my finger.
I don't think that anyone is saying that. The code base is very organized and it looks to be efficient doing what it does. However for most people here, the workings are too magical as they all route back to the $_Kernel object with its magic functions, making hard to figure out where the actual implementation is
Nope, there is very little code that is "useless" entirely. But if I don't use it, it's pointless for me to persue it. My framework is not useless to me, but it certainly is to anyone else. :P

While the KERNEL object had me confused, it didn't long to figure out what it was used for. I dislike the name, but it's purpose is fairly trivial which made it easy. It was the compiler objet that had me holding my breathe for bit. But again, if all your looking for is a codebase to speed up your development, it does do that, just not as well as a properly constructed MVC framework. Although it's learning curve is far less than learning MVC properly, so astions's you probably really want to strees that, as there is a huge market for developers not interested in learning MVC, but instead just want something to expedite their own development.

Re: Here guys - adeframework.com

Posted: Wed Jun 18, 2008 8:48 pm
by Bruno De Barros
Your framework looks good enough. It's like mine. Might not be perfect for everybody, but it suits your own coding style. I'll have to take a deeper look to it, though. In the old version of my framework, I had $_DRIVER instead of $_KERNEL, and it didn't do as much, but it's quite similar, although mine did use MVC.

I like the idea of not needing to learn a lot to use it. I hate massive frameworks that take days/weeks to get the hang of. I like my tiny framework, that can be easily extended / changed to fit any individual website, and that can include 3rd party classes without any need for modifications to their code. This allowed me to include libraries like SwiftMailer, HTMLPurifier, etc., and make use of their full power.

Re: Here guys - adeframework.com

Posted: Wed Jun 18, 2008 10:42 pm
by Benjamin
Hey Thank you for the comments. If you have any questions let me know.