SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Wact
-
Dec 26, 2003, 20:58 #1
- Join Date
- Feb 2003
- Location
- Virginia
- Posts
- 143
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Wact
I told the creators of WACT (Web Application Component Toolkit)
that I would check out their porject when I got a chance and let them know what I think. I've just done a really close inspection and I got stuff to say!
I have some positive points and some questions: hopefully I can come to a greater understanding of what the final design objective is versus where things stand now.
Strengths:
- good use of accessors
- iterators!
- template style compatible with .NET
- a generally well thought out api - easy to understand
- good explaination of design patterns
- ambitious coding regimen! - ModelViewController, TemplateView, PageController, TransactionScript, RecordSet, LayerSupertype
- What problem (set) prompted the creation of WACT?
- What solution or leading example does WACT provide in regard to other PHP projects?
- In regards to the PUSH and PULL methods you use to parse/present data; which do you forsee being the long term focus of WACT?
- When are you switching PHP 5?
- Will you eventually use PHP 5 DOM and XML fuctions to expand on current efforts?
- How does one aggregate views using the pull and push methods?
- How does security fit into the scope of WACT?
- How is template/application logic managed?
- Does WACT lead to high coupling in the MVC, why or whynot?
- What is the ultimate design objective of this project?
Last thoughts. PHP 4 just doesn't do this project justice, for example I run a 2500 barton core AMD with 500 megs of mem, Apache, PHP 4.3.3 - the simple examples we processing in around .10 - .14 seconds! A simple tag was taking that long, and at first I thought this just doesn;t play to the strengths of PHP - intersting - but it's just TOO slow.
Then I decided to load Turck cache and the time droped effectively by half to .06 - .08 seconds. I then got a wild idea to try PHP 5 beta 3 on the example as I was SHOCKED to find that the times dropped by 900 - 1000%! In other words those same simple tags were loading in .006 - .01 seconds AND it was without Turck caching in PHP 5. With Turck caching and I'm sure thre times would fall further.
What this means is that the program went from concept to a viable solution, speed is crutial because bringing the server to it's knees on a single request is not attractive - unless you read slashdot.
I want to now see this project in all the glory of PHP 5's new object model and perhaps even using some of it's principles like DOM, XML and Tokens to further refine development/implementation of WACT push/pull methology. Based on what i've seen so far the program looks less academic and more practical.
Things could get interesting, I'm curious to find out.
Thx for reading. I look forward to your responses.
Re-solution
-
Dec 27, 2003, 05:52 #2
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Wow. Thanks for looking at WACT in such depth. This is very helpful.
Originally Posted by Resolution
Originally Posted by Resolution
Originally Posted by Resolution
Originally Posted by Resolution
WACT will likely support PHP 4 and 5 in parallel for some time after PHP 5 is released. (probably a year or more) It all depends on how fast the PHP hosting community switches from being predominately PHP 4 to predominately PHP 5.
Originally Posted by Resolution
Originally Posted by Resolution
Originally Posted by Resolution
In normal use, the database classes will store these special characters in the database as characters and be unaffected by SQL injection attacks. The database classes support a makeLiteral method which should be used when constructing SQL statements manually to prevent SQL injection attacks.
Once special characters are in the database, the template system does not currently provide any escaping of these characters when outputting to html (except in forms). This has to be done manually for now. Automatic default escaping of output variables (ala smarty) is high on our priority list for new features.
Originally Posted by Resolution
This is an ongoing area of development.
Originally Posted by Resolution
Originally Posted by Resolution
Originally Posted by Resolution
Code:[templates] forcecompile = TRUE
Originally Posted by Resolution
Originally Posted by Resolution
No caching:
Code:WACT Requests per second: 12.45 [#/sec] (mean) Smarty + Pear DB Requests per second: 4.80 [#/sec] (mean) Smarty + Adodb Requests per second: 3.85 [#/sec] (mean) PHPLIb + Pear DB Requests per second: 5.34 [#/sec] (mean) PHPLib + Adodb Requests per second: 3.89 [#/sec] (mean) no templates + Native SQL Requests per second: 46.53 [#/sec] (mean) PHPLib + Native SQL Requests per second: 10.71 [#/sec] (mean) Smarty + Native SQL Requests per second: 10.46 [#/sec] (mean)
Code:WACT Requests per second: 17.45 [#/sec] (mean) Smarty + Native SQL Requests per second: 8.18 [#/sec] (mean) 100% Native PHP uncached Requests per second: 47.08 [#/sec] (mean)
I would be thrilled to see the results of running these benchmarks under Turck cache. I would be thrilled if the benchmarks even worked under PHP 5.
I hope I've been able to answer your questions.
Also, a note on project status, we should be making a downloadable release in the next few days. We're just finishing up a couple of installation READMEs before the release.
-
Dec 29, 2003, 18:48 #3
- Join Date
- Feb 2003
- Location
- Virginia
- Posts
- 143
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you for your indepth response!
I did have a question though I'm still curious about:
- How does security fit into the scope of WACT?
Also, on thinking more after reading your response what I think attracts me the most to WACT is the tag style that is used. I like the ability to transform XHTML and also use WACT tags to encapsulate data to be transformed.
- What is next on your todo list for the project?
- What other tags and syntax will you all be using?
- How do you decide what ecomes a tag?
- How will WACT handle conditional loops?
- Will that be in the control file (php) or in the template itself? I think this is where many projects have trouble.
- Would you elaborate on the compile process somewhat?
- Is the compile process what really speeds up WACt or is it a combination of somthing else?
Re-solution
-
Jan 5, 2004, 19:03 #4
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Resolution
Originally Posted by Resolution
Add PullValues to template engine
Are probably the highest priority/highest visibility. There are alot of internal refactoring, bug fixes, etc. After that, there will be more work on the controllers. I think I have some cool ideas on that front
Originally Posted by Resolution
<MIRROR>
<COLUMN>
<ALTERNATE>
<COMMENT>
Originally Posted by Resolution
Originally Posted by Resolution
Originally Posted by Resolution
Other component architectures (such as ASP.NET) usually have one representation of the component which handles compilation, design, and configuration issues as well as run time issues. because standard PHP is not compiled, I chose to break this up for performance reasons at the expense of making it more difficult to write new tags.
The compiled template file can be considered a combination of a serialized tree and a partial traversal of that tree. It is my hope that this approach will give superior performance to the straight serialization approach, such as ASP.NET would use or the non-component approach, such as smarty uses. The WACT approach is a hybrid that sacrifices ease of tag development for performance. Tag use is unaffected.
Originally Posted by Resolution
Another reason is that WACT has small classes with limited functionality. Thus, it doesn't load a lot of code you probably aren't using. Another reason is the PULL model in WACT avoids calculating values that may be used in the template when they aren't used in the template. The PULL model also avoid double iterating in lists, which is required for the push model and can save a bit of time.
sorry it took a while to reply.
-
Jan 5, 2004, 22:21 #5
- Join Date
- Sep 2003
- Location
- Wixom, Michigan
- Posts
- 591
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the insight, Selkirk. The more I learn about WACT, the more I like the design choices you and the team made.
-
Jan 5, 2004, 22:33 #6
- Join Date
- Jul 2003
- Location
- Palo Alto
- Posts
- 179
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Echo ghurtado. Nice job.
I think there is a world market for maybe five computers.
- Thomas Watson, chairman of IBM, 1943.
-
Jan 6, 2004, 04:02 #7
- Join Date
- Aug 2003
- Location
- Sydney
- Posts
- 187
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes echoing ghurtados opionions i do feel the same way as him. The project has implemented very good Patterns and ones that come useful in a lot of situations.
I might give it a go, but im unsure at the moment. Right now relating to the thread i posted titled 'Classes' im just trying to find an easier way to load common classes and then will look at implementing various Design Patterns into my coding, also refering to Refactoring (Fowler) to help me create more efficient and effective code. But yes WACT does seem very good. Might toy with it when i get back home.
-
Jan 6, 2004, 05:07 #8
- Join Date
- Feb 2003
- Location
- Virginia
- Posts
- 143
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you for the great explaination again!
I see what you mean about the compiled templates, it's an interesting approach. When I get a bit more free time I'll delve into the process a bit more.
I'm curious though about the PULL methology and how it will work out in the grand scheme of things. Though pull has it's positives like selective load/execute and a more developer friendly view to interface with it just doesn't seem to hold up in other areas as well - opposed to the PUSH method you employ.
Take for instance earlier I asked :How does one aggregate views using the pull and push methods?
I'll leave out PUSH as it is PULL that puzzles me still in how it scales and functions within PHP.
Since all HTML is output upon process and HTML is processed top to bottom how then do you say add java script to a header in the 3rd nested view, where the 3rd nested view begins in the BODY tag?
This puzzle seems to get ugly for PULL. Though I could be incorrect, it seems PULL is well suited to smaller set of views as opposed to PUSH which is suited to a large set of views - per request.
PULL seems really elegant in how it only takes - system resources - what it needs, somewhat of a lazy load pattern but by doing this it seems to sacrafice flexability in the view layer.
Whereas PUSH loads all that it is given gaining flexability but sacrificing speed.
There's got to be a way to mix and match modes. I'm thinking..
Here is an interesting thought, what if a traditional PUSH "Model, Controller" and a PULL "View" where molded together somehow? That might yield a best of both worlds scenario - or at least a more favorable approach over a pure PULL or PUSH. Hmmm.. The hampster is now running in the cage..
If I can figure that puzzle out I would like to adopt WACT into my own project, as a hybrid of two styles. That would be interesting. What do you think about the PUSH and PULL method being used together?
Oh, Btw in regards to Add output filters to template engine - I thought mabey a small exercise I did using intercepting filters, could help expedite your design process. I know how hectic schedules can get. http://www.sitepointforums.com/showp...8&postcount=71
Feel free to comment on it's strengths and weaknesses. I plan on using that pattern!
Anyhow, this is a great project - WACT - I would like to help out if possible, that is if you and the team could use an extra pair of hemispheres. hehe...
Cheers,
Res
-
Jan 9, 2004, 10:14 #9
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Resolution
Originally Posted by Resolution
Anyhow, this is a great project - WACT - I would like to help out if possible, that is if you and the team could use an extra pair of hemispheres. hehe...
I would suggest joining the WACT development mailing list as a first step.
-
Jan 9, 2004, 13:24 #10
- Join Date
- Feb 2003
- Location
- Virginia
- Posts
- 143
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Firstly, thank you for responding, the conversation has been interesting as WACT seems to be very convincing in terms of view solutions. Koodos.
Absolutely. We are definately looking for help. How about developing an example of aggregate views
Anyhow, I will sign up for the mailing list - later.
Res
Bookmarks