PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Dec 13, 2019 11:32 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Framework development
PostPosted: Mon Sep 27, 2010 8:50 am 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 9:06 am 
Offline
Forum Contributor
User avatar

Joined: Mon Sep 27, 2010 2:27 am
Posts: 152
Location: Ukraine, Kharkov
There are lots of frameworks. Who needs one more?


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 10:35 am 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6
Yes that's true, but this one is very special. The development process is fast, clean and learning to develop with this framework is easy for OOP programmers.
It's inspired from the java world and offers a lot of features in a manner every OO-Programmer knows from java or .Net.
It's easy to make web applications and also to maintain these because of the high separation.
The component based part of the framework for web development is designed to abstract every language like HTML, Javascript and CSS is planned too. If a renderer is available for other languages, e.g. WML, the application has not to be changed, because the Renderkit will choose the right renderers for the clients.
It offeres high level components which are similar to HTML5 components but also work in HTML4, of course because of the use of Javascript in a HTML renderer.
This framework is very structured because it uses namespaces. Maybe have a look at it and give your opinion about it?


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 11:15 am 
Offline
Forum Contributor
User avatar

Joined: Mon Sep 27, 2010 2:27 am
Posts: 152
Location: Ukraine, Kharkov
Maybe later. I wish you good luck and hope your framework won't become just one of.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 12:31 pm 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6
Thanks and i hope you will enjoy trying it out. Just a little example of a helloworld application

<?xml version='1.0' encoding='UTF-8' ?>
<b:view xmlns:b="http://blaze.blazebit.com/web/framework/">
<b:head>
<b:title value="Index page"/>
</b:head>
<b:body>
<b:outputText value="Hello World"/>
</b:body>
</b:view>

Accessing the business layer can be done in all attributes except id and look like:

<b:commandButton value="Success" action="{businessLogic.method}"/>

This will call a method in a so called Nut which can be defined in the configuration xml and gets automatically instatiated and destroyed based on the scope rules.
Such bindings can return values, set values or execute methods which is the glue between views and business logic.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 2:05 pm 
Offline
Forum Contributor
User avatar

Joined: Mon Sep 27, 2010 2:27 am
Posts: 152
Location: Ukraine, Kharkov
I'm not a big fan of XML. Even for AJAX data exchange I prefer to use JSON instead of XML due to less trafic and less code. Presently I'm interested in a framework for distributed and heavy loaded systems.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 2:08 pm 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
Why replace HTML with XML..? that's a very backwards choice in my opinion


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 2:37 pm 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6
Why is it a backwards choice? HTML is a XML-like markup language which has some (dirty) extra features.
Mainly I choose XML because it's clearly structured, strict and to make it as easy as possible for html developers to learn/understand the framework.
I could and i will probably also introduce a driver based configuration mapper which then can use formats like: YAML, XML, JSON etc.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 4:03 pm 
Offline
DevNet Master
User avatar

Joined: Fri Jan 18, 2008 1:36 am
Posts: 3549
Location: Israel, ME
HTML and XML are both markup languages, that is true. However, HTML was made as a representational markup for web pages, while XML is a generic markup language. HTML already contains semantics and functionality that web pages understand, while XML needs to be much more verbose to describe the same set of features. Also, XML error handling is really draconian, your website will break completely (= die) on every markup mistake.

A generic tool can never compete with a specialized one for a specific task. XML is the sledgehammer of markup languages


Last edited by Eran on Mon Sep 27, 2010 4:04 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 4:04 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto
All I see is another language to try and teach the designers to get by on. No thanks! :)

It's hard enough to get them to produce legible and valid HTML markup.


Top
 Profile  
 
PostPosted: Mon Sep 27, 2010 5:43 pm 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6
You probably think that you have to learn a new language, but it's not 100% true. The tags are oriented on HTML5, so and with an IDE like Netbeans you also have the just in time xml check with the XSD defined for documents.
The XSD is designed in such a way that you can not produce invalid markup. Basically everyone could let a XML/SGML-Parser check their documents and so you would only have valid code, but many people mix the view definitions with the business logic or other things and then no w3c validator can check it. This framework does not allow to include any complex logic into the view definition, so i think it's not possible to produce invalid code with the right XSD.
Of course many of the things are not 100% implemented yet, but work is in progress.

Designers' work will improve by using this kind of view definition, because the markup they produce is not bound to only HTML4.01 Strict or any other standard, because different renderers produce valid markup for different standards or languages. Just imagine, you design something now and in one year every browser supports HTML5 so you want to use it for faster rendering and so on. You will just have to change the RederKitFactory(one line) to use a different rederkit and your application is rendered as html5. You can make this decision also dependent on the user agent or so. The next thing is, that designers won't have to think about much javascript anymore, because many effects can be defined with XML(there is still the option to write custom JS).

CSS abstraction is another feature i am planning to realise, but for now the tag library and the business logic APIs are more important.
Short description for CSS abstraction:
A designer will only have to write a CSS3 like language(of course it must fit to the framework and can not be CSS3 itself). The style code will be translated into, e.g. valid CSS2 styles with hacks to enable all css3 features which were used even for browsers like IE6 or so. Wouldn't that be nice?

By the way, intellisense for XML rules! Especially when there is a documentation block for quick info!


Top
 Profile  
 
PostPosted: Tue Sep 28, 2010 3:43 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida
Markup languages are not programming languages, please stop treating them as if they are. WHy would you want to go and throw out the baby with the bath water by using XML instead of PHP code? No more code completion. No more helpful error messages, not more power, no more ease of use. Bad bad bad idea all around in my opinion. I had the Java "spring" style framework there are too many "frameworks" like these. Is your framework even unit tested?

At only 119 revisions, I don't really think you can claim its easy to use, or anything else you've claimed. You're making claims about something that barely exists yet, in fact if I'm not mistaken the "files" tab on sourceforge shows that you've made no code, absolutely no code what so ever, available to the public.

Sorry your tests aren't very good

Syntax: [ Download ] [ Hide ]
 /**
48     * @todo Implement testGetClass().
49     */

50     public function testPerformance() {
51     // Remove the following lines when you implement this test.
52     foreach($this->object as $obj)
53     $obj->run();
54     }


Half of them don't make any assertions. The other half seem to test rather trivial stuff, like re-testing PHP's built in clone() method, etc... while the important stuff has gone untested, it seems like to me. None of it makes any sense so no I don't think its easy to use. whats a taglib? a renderkit? a navigation? a navigation rule? These terms not meaningful at all.

If you need more evidence you're missing the point with testing, see this revision log message "Fixed a lot of bugs especially session bugs". Generally when doing it "right" you're going to have 1 commit per bug fix & corresponding test, and there shouldn't be "a lot" of bugs, especially 100 revisions into the project!! 99% of your files have "fixed bugs" listed in a different manner for each file. Perhaps you should slow down and think this through. No one is going to use a buggy framework.

Also if you want to see the meaning of fast development check out the symfony "admin generator" screencast.


Top
 Profile  
 
PostPosted: Tue Sep 28, 2010 5:35 pm 
Offline
Forum Newbie

Joined: Mon Sep 27, 2010 8:18 am
Posts: 6
Thank you for your answer, it's really nice to see that somebody really tried the framework out!
Mainly I want to use XML because it's very easy possible to create structured views with less overhead. PHP Code would need getters and setters for attributes and so on so I decided to use XML, it's a design choice but the XML gets parsed into a component tree, similar to JSF technology. Such a component tree could be made programatically too, which is not recommended but it's possible. The framework is in an alpha status so it should be clear that not everything is unit tested. I wanted to start with TDD, but I needed functionality for some projects and I left many of these out. Some of the tests I made are really bad, that's true, but I am more or less the only developer. I really want to attract people to the framework and this is only possible when I offer features. The fact that the current revision number is 119 does not affect the quality of the code, I developed much of the framework before I started to commit on this SVN server.

There are still no tutorials or great documentations to make it possible for someone to really look into the framework. That's probably a reason why some terms don't make sense to you, JSF developers would probably say that this framwork is an improved version of the Java SDK and the JSF technology in an early status, but I did not excpect such an answer. I will work hard on documentation as soon as I get some more features done and I hope someone could give me another review about the usability and so on.

The SVN comments are not really detailed, because I don't get any tickets for specific bugs and I just try to fix bugs I realise during the development. The framework gets updated as soon as I find a bug, but with no community it makes no sense to me, to really write exactly which bugs were fixed. Another reason for that commit manner is, because the plans for the architecture only exist on a piece of paper for me(for now) and I always try to refactor it or add functionalities. At the moment there are no people to talk with about architecture, so why should I make an overhead and write every little change of an API to the SVN commits?

I also watched the screencast, but I want to see if someone can really develop an application so fast with symfony. You really have to know a lot about the behaviours of the framework, mine is similar to HTML5 and is more instinctive. Of course it's component based and has an event model but mainly it should provide an abstraction over all protocols and languages and be not limited to the thinking of server sided or client sided programming. In many frameworks a developer has to inject (sometimes complex) PHP/JS code into a view to get the expected result or behavior. My framework not only offers an easy way to write complex applications, but also to write valid markup! Because of the renderer technology and the XML-Schema for documents the rendered markup is always valid.

The first review was really nice and I thank you for your time, I will work on the things you suggested and hope you will try the code out again.
I would like to ask some more people about what they think, maybe someone who already developed JSF applications?


Top
 Profile  
 
PostPosted: Thu Sep 30, 2010 1:24 pm 
Offline
DevNet Master

Joined: Wed Feb 11, 2004 4:23 pm
Posts: 4872
Location: Palm beach, Florida


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group