Xtend-It PHP Framework

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Xtend-It PHP Framework

Post by alexs »

I know there are a lot of frameworks out there, but i build this one because every other framework had a disadvantage that I considered unacceptable

Zend: is not actually a fw, more of an extension for PHP, no APC and I did not like their approach on MVC, I would have liked more something like ASP.NET
Symfony: the structure is quite rigid, you have to implement things exactly the way the designers intended and I did not liked the idea of generating code
QCodo: too much focus on interface controls, jQuery can handle things a lot better(makes callbacks too often on visual components - should use JS there)
CodeIgniter: still rigid (like Symfony), does not have AJAX support - event handling

Now about Xtend-It:

1. Removes the dependency on links but still provides full control, you can transform events into links via a URL manager (full SEO control)
2. It's fast (loads in 0.6 ms on a modern server and renders a page in under 10ms, I also have plans to boost that)
3. PHP WebControls objects have an alias JS WebControl that makes data exchange between the server
and client very easy (2 ways: as a triggered event, as call - the JS side will get the return of the PHP method)
4. Back & Forward support for browser navigation on AJAX requests/events (don't know any frame that offers this)
5. Flexible rendering (overwriting / template / string variable / delegate / or you can design your own)
6. Designed for code Auto Completion (add it to the lib or prj in your IDE)
7. You can code your way, the frame wraps on your needs and not the other way around
8. Very simple, copy/paste setup
9. Objects are only included when called
10. Designed to be able to add third party code

You can have more details on xtend-it.com it's free & open source but you will have to contact me to get a copy at the moment, will be wide available in 2 months (i just wanna finish some features so it will not be considered incomplete)
There is already a project build on it: romguide.ro/en and we are using it for all our projects therefor improving it :wink:

Let me know what you guys think I will write some docs soon

Thanks,
Alex
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

Alex, first off, great name, you must be a brilliant developer :p
1. Removes the dependency on links but still provides full control, you can transform events into links via a URL manager (full SEO control)
I'm not sure I understand what your saying. Most MVC frameworks that support a front controller, also support custom routing. Routing is the process of parsing a URI and figuring out what controller:action to dispatch to. In some frameworks, like Zend, they take it a step further and also modularize their controllers.
It's fast (loads in 0.6 ms on a modern server and renders a page in under 10ms, I also have plans to boost that)
While the performance of a framework is important to many (including myself) it's the application overall performance I really care about. How many page requests can I serve, compared to say an equivelant built on ZF, CI, CakePHP, etc?

Without seeing the code I cannot truly pick it apart, if thats what your after. It sounds like a very specialized framework, tightly coupled to AJAX, which would turn me off instantly, to be honest. A matter of choice, perhaps, but I keep my own framework extremely light weight, in terms of architecture but almost everything is pluggable/extendable, so custom routing, filtering, etc. I do have AJAX support built into the HTTP version of the request object, so each action can determine whether a full page is to be displayed or not. The actual composition of pages is done by a view manager of sorts so it keeps actions pretty simple and light weight.

Zend is actually highly extensible, I just find everything overly complex (especially routing). All the classes are well designed interfaces, just over engineer'ed.

Cheers,
Alex
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

I'm not sure I understand what your saying. Most MVC frameworks that support a front controller, also support custom routing.
Yes but can you build a project without working with the controllers ? or having to place your code in a certain folder so that the frame will understand it ?
I will get back with an example here
While the performance of a framework is important to many (including myself) it's the application overall performance I really care about. How many page requests can I serve, compared to say an equivelant built on ZF, CI, CakePHP, etc?
The framework itself loads in 0.6 ms, it is your code that will determine the rest of the performance
In terms of ultimate performance i can see 2 scenarios:
1. The request is for a page or control based on a context (here you can buffer the page/control(s) even for 2-3 sec if you have a tons of requests)
2. The request is for a web service or anything else that is not HTML ... in this case after the first 0.6 ms you decide what the code does and what you call the frame is light and calls nothing without your doing so
It sounds like a very specialized framework, tightly coupled to AJAX
Actually you can avoid using AJAX, as I said the way the requests are sent/received can be customized or setup using the currently available options, here you can also set what control has to be resent to the browser using: $this->setChanged(true);

Regarding Zend I see it more like a utility addon for PHP than a frame, are you using Zend constantly ?

I will release the sources in a few weeks
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

My Eample:

I have a module in /Xtend-It/modules/wadmin/
there are all the classes, images, css, js and so on

now in some new folder I create a file called
index.php

with this code

Code: Select all

<?php

require_once("../../../Xtend-It/init.php");

QAutoload::AddWatchFolder(rtrim(dirname(__FILE__), "/")."/code/", true);
QSql::SetConnection(QSql::DefaultTag, QSqlConnection::TypeMySql, "localhost", 3306, "root", "*", "dbname");

QSql::GetConnection()->connect();
QSql::GetConnection()->setClientEncoding("utf8");

QWebApp::Init("QWebApp");

QWebApp::SetTempPath("temp/");

QWebApp::SetDefaultUrlManager(new QUrlManager());

WaAdminModule::$Admin = new WaAdmin(QSql::GetConnection(), "ww_", true, "dbname");

QWebApp::AddWebListener("WaAdminModule", true);
QWebApp::Run();

?>
This is ALL that you need to do !!! (except adding some perms to let the frame create the temp folders)

You can have a preview of the application here:
http://www.xtend-it.com/imgs/admin_1.png
...
http://www.xtend-it.com/imgs/admin_9.png
(the config for all the forms/grids is made via the interface itself)

As you can see the "WaAdminModule" is not picky and will work on any location where it is called, no manual routing required

PS: I can change the name Xtend-It if you guys are thinking it's inappropriate :banghead:
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

Yes but can you build a project without working with the controllers ? or having to place your code in a certain folder so that the frame will understand it ?
Some frameworks place constraints on where your controller files should go, thats not nessecarily a bad thing.

1. It enforces a consistent approach
2. It takes the guess work out of naming and location of your files
The framework itself loads in 0.6 ms, it is your code that will determine the rest of the performance
Numbers are entirely useless without quantifiable evidence, comparative analysis, etc. My framework loads in a fraction of a second too, on a quad core i7 with 2GB RAM with minimal daemon services running. However on my desktop, during development it runs significantly slower.
Actually you can avoid using AJAX
When I use a framework, I don't want to avoid anything. I don't want the functionality to exist at all. Zend is nice that way, as it's heavy use of dependency injection allows me to tweak and remove unessecary functionality. If anything AJAX is even loaded or parsed and never used, that is code overhead which I do not care for.
Regarding Zend I see it more like a utility addon for PHP than a frame, are you using Zend constantly ?
I have used Zend on several projects, but I do not use it exclusviely. I use my own minimalistic controller focused framework. Models and Views are optional but typically implemented alongside each controller.

Zend is indeed a framework by it's most pure definition. PEAR is an addon to PHP, it's a library more than a framework. A framework enforces some standard architecture, such as MVC or MVP. The booting, dispatching, routing processes are outside the scope of a basic framework, IMO. This is where you start stepping into the boundries of a application framework, or skeleton application. Zend requires a lot of manual wiring to allow for greatest flexibility.

Cheers,
Alex
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Xtend-It PHP Framework

Post by Eran »

Some frameworks place constraints on where your controller files should go, thats not nessecarily a bad thing.

1. It enforces a consistent approach
2. It takes the guess work out of naming and location of your files
Agreed, coding conventions and standards are very important for maintainability and collaboration
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

1. It enforces a consistent approach
2. It takes the guess work out of naming and location of your files
My platform also has guidelines this is not what this is about. You are missing the point. We are also talking about all the platforms or ?!
Specify a platform and I will explain the downside please
Numbers are entirely useless without quantifiable evidence, comparative analysis, etc. My framework loads in a fraction of a second too, on a quad core i7 with 2GB RAM
The point was that the frame footprint is ignorable. Objects are only loaded if needed.
When I use a framework, I don't want to avoid anything.
The frame makes full use of PHP's autoload classes are only called if used.
Let's not compare it with Zend for performance as Zend it's a build in module so it's already up at the first echo
I don't want the functionality to exist at all.
I think you are just being too negative about this.

At the moment my thoughts are that even with the best PHP framework it will be very hard to get people to use it :banghead:

My frame is a bit like QCodo if anyone ever seen it, but with great consideration to work load and resource usage and a bunch of new cool features, please have a look a bit here: http://www.xtend-it.com/
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

I think you are just being too negative about this.
Sorry, not trying to be negative, just being realistic.

I don't think, from what you have explained nor demonstrated, that you have much working experience with existing frameworks. It sounds as though you have certainly used some (Zend, CakePHP, etc) but then decided to dart off and create your own. Which is very common, but none-the-less a bad idea, if what you are expecting is a massive following of your framework.

Nothing wrong with building your own framework, but if you are appealing to seasoned professionals who are very familiar with existing frameworks, I think don't stand a much of a chance as most will have:

a. Built their own according to their standards
b. Began following Zend which promotes the best practices

I see new frameworks about once a month pop up on forums. Honestly, the odds of me using yours are a million to one. Your best odds at rapid adoption, is appealing to less experienced crowd, some design forums maybe, where the coders are still writing everything from scratch.

Cheers,
Alex
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Xtend-It PHP Framework

Post by Weirdan »

Let's not compare it with Zend for performance as Zend it's a build in module so it's already up at the first echo
What do you mean by this? Zend Framework is your ordinary pure PHP framework, it isn't written in C and compiled into PHP if that's what you meant. Do not confuse ZF with Zend Engine.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

hat do you mean by this? Zend Framework is your ordinary pure PHP framework, it isn't written in C and compiled into PHP if that's what you meant. Do not confuse ZF with Zend Engine.
Judging by the OP's web site, he/she is confusing Zend server with the framework, etc.

Cheers,
Alex
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

Alex, first of all thank you very much for your critics, someone saying "wow" or "excellent" would be of no help :drunk:
So thanks !

My main issue was reusability. Are you reusing your code with ease ?! Are you copy/pasting things ?
Let's go by an example.

We build a web control that lists some products, orders them, has pagination and knows how to list a product + a photo gallery
this control would have some CSS file(s), js and images

The scenario for reusing it in my frame would be:

1. create a new PHP class that extends the original
2. customize the template (if you used this method) or override the needed rendering functions (depends on how you play it)
3. add or overwrite css (if you need to)
4. extend the JS Class of the control (if you need to)
5. ... change it in any way you like

Now the fun part is that if you control is not dependent of any other functionality you can move it in your frame's third party folder and reuse-it as well
because the frame is smart all you have to do is simply move the files
This would also apply to the MODEL object(s)

Now how is this working for another platform especially for objects that you designed and you are planning to reuse. Also since you did do your own frame it means you were not happy with what it was on the market (Zend included for the part with request handling)!

PS: I want to convince the good developers, this platform is intended and designed for hard stuff not trivial echos, I also have objects to manage the SQL structure, compare 2 databases (up to field comments) and much more
PPS: "a million to one" still means there is a spark somewhere :-)
Zend Framework is your ordinary pure PHP framework, it isn't written in C and compiled into PHP if that's what you meant. Do not confuse ZF with Zend Engine.
Yes you are correct, a BIG BLACK BALL for me! I never installed it myself and i assumed it was coming compiled since the download here http://framework.zend.com/download/latest includes Zend Server
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

Judging by the OP's web site, he/she is confusing Zend server with the framework, etc.
No I am not :P I just assumed it's compiled
User avatar
alexs
Forum Newbie
Posts: 15
Joined: Wed Sep 01, 2010 4:53 am
Location: Brasov, Romania
Contact:

Re: Xtend-It PHP Framework

Post by alexs »

etc.
Btw, the "OP" started with Basic (the old basic no VB) when he was 8 then C++, Java, PHP, .NET and a lot more :P
also the OP developed this
this sucks in a way because it was done in .NET
(but i have learned and it will be available under C++ in a few weeks)

I'm ok with you rejecting my framework I always knew it was a long shot, but will make waves once the result will kick in
so you will like it because of what was build on it ;-) ... maybe :P

Anyway you were right with your:
a. Built their own according to their standards
b. Began following Zend which promotes the best practices
But even Zend won't be 1st forever ;-)
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

Alex, first of all thank you very much for your critics, someone saying "wow" or "excellent" would be of no help
Wrong forum. :p

Secondly it wouldhelp if we actually seen code and/or demonstrations of how your framework can improve delivery time.
My main issue was reusability. Are you reusing your code with ease ?! Are you copy/pasting things ?
Let's go by an example.
I very rarely copy/paste anything. I use highly atomic, specialized classes almost exclusively, so reuse consists of wiring togather many distinct objects.

---

I'll write more later I'm just finishing up at work.

Cheers,
Alex
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Xtend-It PHP Framework

Post by alex.barylski »

Your barking up the wrong tree. This crowd is more concerned with best practices, clean separation of concerns, high cohesion loose coupling, OOP...

You haven't focused on anything of that nature yet. I am willing to bet if you posted code here, it would be torn apart by critics looking for accepted best practices. That is not to say your framework isn't good at what it does. Tony Marston has a similar framework:

http://www.radicore.org/

Lots of promising techniques and solutions until you have to dig in and customize something. The problem with frameworks like radicore, is they are built to solve a single style of vertical market software. Try and use Radicore to build a advanced CMS. Sure you could probably emulate something like WordPress, but when it came to offering custom URI structure/masks, adding RSS modules, or using custom front-side themes, you'd probably give up.

Zend can be used in multiple environements:

1. Front side and admin applications
2. CLI or HTTP

Pretty much every component can be tweaked with relative ease (still to much IMO but that is a consequence of classes trying to do to much and failing to adhere to SRP) by injecting alternative or custom implementation providers. For example, you can use the generic table data gateway class and only changing a few lines of code, you coudl switch the RDBMS driver from MySQL to MSSQL or whatever is supported by Zend.

That same technique can be applied to literally everything. Do you want to store your configuration data in INI file? How about XML?

There is no framework that does this as well (or rather robust) as Zend, simply because it's popularity. Myu framework is very similar in design, but far less capable, because my library of code is minimal.

You can build on top of Zend to implement anything you can possibly imagine, it doesn't sound like your framework would accomplish the same, simply because of the amount of automation you added in attempt to reduce work required.

Drupal, Joomla, WordPress, are all well known CMS but gradually they have become something of a application framework.

Keep at it, post your code, actually study and use Zend, CodeIgnitor, CakePHP.

Cheers,
Alex
Post Reply