469,366 Members | 2,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

Professional Applications Devolpment

Hi,

First of all:
i spend a lot of time on thinking and researching about how to
make developing webapplications with php a more structured/systematic
thing. I even fancied to switch over to jsp since i heard all those
stiltedness rumors about it's professionalism/stability etc.

Anyway my current attitude is that fullfilling the following needs
would make application depvelopment via PHP a really
fast/professional/structured thing:

- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
- disciplined/skilled Devloper ;)

These are of course not really new findings and
as we all know there are a lot of different implementions/combinations
of the above named out on the web.

So what i want to know is:
- what is your prefered software/framework to fullfill the above
needs.?
- For what purposal do you use them ?
- what are the advantages/disadvantages ?

Wouldn't it be nice to have something like the
"PHP professional webapplication development guidline" ?
containing:
- toolkits/frameworks
- techniques
- tutorials etc.

I think this is really worth thinking and talking about.

Cheers,
NIkolas

Oct 12 '05 #1
65 4805
I am going to be very interested in this thread!

I have been trying to develop a good application framework for a new
web application: a sourceforge project called OSCommerce-XSL which is
intended to be a professional version of osCommerce. The goal is to
use PHP to query an SQL database. The PHP produces XML for XSL to
transform into XHTML. This transformation occurs server side. Optional
Javascript validation of form inputs. Mandatory PHP validation of form
inputs.

So far I have divided the application into the following tiers
View: XSL layer to produce XHTML from XML
Controller: PHP takes URI requests. Validates form input. Produces the
outgoing XML and passes it to the View layer once at the very end.
Model-business layer: a purely PHP layer. No XML related function. No
SQL or PEAR.
Model-data layer: This layer exists to separate the SQL from the rest
of the application

About DB abstraction. With all the SQL dialects this really possible
when queries get complicated? I use PEAR DB but if someone wanted to
change from MySQL they might have to edit many of my SQL statements for
the new dialect.

Form Validation. Which tool kits are available and good? Currently I am
using a PHP class pattern I designed for each form that can validate
input and produce output. I am reasonably happy with what I have
designed but I'm sure it could be better.

Templating. I've tried Smarty but the XML/XSL combination seems much
more powerful. With XML/XSL I like that the application flow is through
the PHP control layer with only conversion using the View layer at the
very end when serving the page to the client. With Smarty the
application flows through the various template files and calls the PHP
as needed.

I haven't seen the MOJAVI project before and will spend some time on
their website.

If you are looking for a sample application to discuss I would gladly
volunteer mine since I am at the right stage of development to do this
kind of discussion.

Peter

Oct 12 '05 #2
Hi Peter
Controller: PHP takes URI requests. Validates form input. Produces the
outgoing XML and passes it to the View layer once at the very end. Is your controller approach capable of managing things like "actions
chains" etc?

Could you provide brief information on the excakt logic flow of your
approach?
Something like a diagram would be nice ;)
With all the SQL dialects this really possible when queries get complicated? I agree ....100% abstraction would affect flexibility...so the way is
to find a
compromise between abstraction/flexibility...same to the form thing.
Templating I've tried Smarty

Me too ...but i don't like it for serveral reasons..

Just to clarify things i do not indend to point out "THE ULTIMATIVE"
frameworkt/templateparser - whatever combination.
But if it exists i would be glad to hear about it ;)

The goal is to give an overview what combinations are passable and what
are their
main/optimal purposals.

e.g.:
use mojavi + smarty...because...
if you got much DB stuff i did good experience on
STUDS + PEAR:DB because....but beware because it lacks of ....

If we could carry together a few scenarios that would be a great
guideline
for those who are looking for an entry to a more professional way of
php development.

Regards,
Nikolas

Oct 12 '05 #3
pe**********@yahoo.com wrote:
I am going to be very interested in this thread!

I have been trying to develop a good application framework for a new
web application: a sourceforge project called OSCommerce-XSL which is
intended to be a professional version of osCommerce. The goal is to
use PHP to query an SQL database. The PHP produces XML for XSL to
transform into XHTML. This transformation occurs server side. Optional
Javascript validation of form inputs. Mandatory PHP validation of form
inputs.

Having recently started the planning stage of a project very similar to
yours, I am also quite interested in this subject. More in the
consolidation aspect of it than in the 'guideline' aspect.
So far I have divided the application into the following tiers
View: XSL layer to produce XHTML from XML
Controller: PHP takes URI requests. Validates form input. Produces the
outgoing XML and passes it to the View layer once at the very end.
Model-business layer: a purely PHP layer. No XML related function. No
SQL or PEAR.
Model-data layer: This layer exists to separate the SQL from the rest
of the application

About DB abstraction. With all the SQL dialects this really possible
when queries get complicated? I use PEAR DB but if someone wanted to
change from MySQL they might have to edit many of my SQL statements for
the new dialect.

IMO, the database abstraction _code_ should be handled in a fashion
similar to i18n, meaning that just as you would present text to a client
depending on the currently defined language context, the text(code)
presented to the DB should depend on the selected database context.
Form Validation. Which tool kits are available and good? Currently I am
using a PHP class pattern I designed for each form that can validate
input and produce output. I am reasonably happy with what I have
designed but I'm sure it could be better.
What exactly do you mean by a 'PHP class pattern'? Are you using one
'class' to handle all of your forms, or applying a pattern to each of
your forms.
Templating. I've tried Smarty but the XML/XSL combination seems much
more powerful. With XML/XSL I like that the application flow is through
the PHP control layer with only conversion using the View layer at the
very end when serving the page to the client. With Smarty the
application flows through the various template files and calls the PHP
as needed.
Agreed!

I haven't seen the MOJAVI project before and will spend some time on
their website.

If you are looking for a sample application to discuss I would gladly
volunteer mine since I am at the right stage of development to do this
kind of discussion.

Peter

Oct 12 '05 #4
NC
Nikolas Hagelstein wrote:

i spend a lot of time on thinking and researching about how to
make developing webapplications with php a more structured/systematic
thing.
Why stop at development? Or, rather, why start in development?
Structure and system should be first introduced in sales and
implementation...
Anyway my current attitude is that fullfilling the following
needs would make application depvelopment via PHP a really
fast/professional/structured thing:

- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
- disciplined/skilled Devloper ;)
I respectfully disgree. No matter how professional your
development is, your success will NOT be determined by the
quality of development. Whether or not your product uses MVC
(or another fashionable development technique) is of no
consequence to the buyer. The buyer wants to see the relevant
feature set (which is a design issue, ultimately rooted in
marketing), reasonable cost of ownership (which a purely
marketing issue), knowledgeable sales people and responsive
implementation people (which are human resources issues).

On the development side, what you really need is a combination
of coding AND DOCUMENTING guidelines with a code repository and
a defect tracking system. Over time, this will ensure you have
a large base of potentially reusable and reasonably bug-free code.
Whether you want to introduce guidelines that require the use of
MVC or, say, forbid the use of OOP altogether, is a matter of
secondary importance...
Wouldn't it be nice to have something like the
"PHP professional webapplication development guidline" ?
containing:
- toolkits/frameworks
- techniques
- tutorials etc.


I think it's called PEAR; it includes code repository (complete
with dependency checks and defect tracking) and coding guidelines...

Cheers,
NC

Oct 12 '05 #5
NC wrote:
Nikolas Hagelstein wrote:
i spend a lot of time on thinking and researching about how to
make developing webapplications with php a more structured/systematic
thing.

Why stop at development? Or, rather, why start in development?
Structure and system should be first introduced in sales and
implementation...


In not really sure that I understand what you are trying to argue here,
but I would argue that 'Sales' is not necessarily a factor that needs to
be considered in the context of this discussion, and implementation is
only one part of the development process. Structure and system _should_
be 'introduced' (at the minimum) well before implementation .
Anyway my current attitude is that fullfilling the following
needs would make application depvelopment via PHP a really
fast/professional/structured thing:

- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
- disciplined/skilled Devloper ;)

I respectfully disgree. No matter how professional your
development is, your success will NOT be determined by the
quality of development. Whether or not your product uses MVC
(or another fashionable development technique) is of no
consequence to the buyer. The buyer wants to see the relevant
feature set (which is a design issue, ultimately rooted in
marketing), reasonable cost of ownership (which a purely
marketing issue), knowledgeable sales people and responsive
implementation people (which are human resources issues).


Again, you lost me. My first response here would be to see my comment
above on 'Sales' and apply it to every mention of 'buyer' in this
paragraph.
Although you may /sometimes/ be correct in that 'success will NOT be
determined by the quality of development', you definition of success and
mine clearly differ. Proper design markedly increases _your_ ability to
work with, repair, modify and reuse code in the future, and these
abilities are propagated to the user, or 'buyer' in your terms. If the
end user happens to be a developer, or would like to have the software
modified, these attributes are invaluable, and often overlooked and
underestimated in marketing. I would say having these options makes a
project/product more successful.

Regarding your comment that there exists a design issue is "ultimately
rooted in marketing" has me perplexed. The issue with design is
implementing the feature set determined by marketing, and how this
implementation is done should be under the complete control of the
designers (i.e. NOT MARKETING!).

On the development side, what you really need is a combination
of coding AND DOCUMENTING guidelines with a code repository and
a defect tracking system. Over time, this will ensure you have
a large base of potentially reusable and reasonably bug-free code.
Whether you want to introduce guidelines that require the use of
MVC or, say, forbid the use of OOP altogether, is a matter of
secondary importance...

Wouldn't it be nice to have something like the
"PHP professional webapplication development guidline" ?
containing:
- toolkits/frameworks
- techniques
- tutorials etc.

I think it's called PEAR; it includes code repository (complete
with dependency checks and defect tracking) and coding guidelines...


PEAR is indeed one possible answer to the OP's question, though I think
it is far from a complete solution. On an even more abstract level, we
could also say that the solution is PHP itself, or how about 'some
program written in some language that solves the problem'.
Cheers,
NC


Cheers,
Carl.
Oct 12 '05 #6
Nikolas,

First, I'm not a professional web app developer. I'm relatively new to
php. But I am very interested in your proposed discussion.

Since database abstraction still seems to be a problem perhaps a good
solution is to use PEAR DB and then isolate all of the SQL so that it
is easy to work on. The phrasebook design pattern does this and seems
very elegant. Unfortunately I can't get the phrasebook example to work

https://sourceforge.net/projects/phpphrasebook/
If we could carry together a few scenarios that would be a great guideline for those who are looking for an entry to a more professional way of php development.
I thought a comparison like this must exist. Idealists arguing about
the pros and cons of various architectures. I searched for a book on
php application architecture but found nothing other than isolated
application examples. I got excited when I found the magazine
php|Architect but I didn't see any articles covering the entire
application architecture.
Could you provide brief information on the excakt logic flow of your

approach? Something like a diagram would be nice ;)

Maybe the best thing for us to do would be to have a small sample
application that we could study and play with and set up different
ways. Maybe I could strip out a bunch of things from my application as
an example and then draw a diagram.

Peter

Oct 12 '05 #7
Carl,
Having recently started the planning stage of a project very similar to
yours, I am also quite interested in this subject. More in the
consolidation aspect of it than in the 'guideline' aspect.
How similar? If it is eCommerce then perhaps we could work together?
What do you mean by consolidation vs. guideline?

IMO, the database abstraction _code_ should be handled in a fashion
similar to i18n, meaning that just as you would present text to a client
depending on the currently defined language context, the text(code)
presented to the DB should depend on the selected database context.
Say what? What is i18n?
What exactly do you mean by a 'PHP class pattern'? Are you using one
'class' to handle all of your forms, or applying a pattern to each of
your forms.


I am applying a pattern to each form. I think it is neat, tidy and
flexible. It is easy to develop seperately the parts of a new form from
a blank form template. The form handling is about the only part of my
application that I am really happy with. Perhaps if we decide to have a
sample application I can explain more after strip the bells and
whistles from my code.

-Peter

Oct 12 '05 #8
NC,

I'm not sure if you are thinking along the same lines as Nikolas'
proposal. He is talking about the overall application architecture.
Isn't PEAR only a set of components that can be connected by inserting
them into an application archeticture?

I'm not sure why you disagree with Nikolas' proposal. As you say, the
buyer only cares about the feature set, cost and responsive
implementation. The last two are products of the architecture. I think
Nikolas' proposal is very valid because after the sales pitch is
successful the developers have to sit down and type something. What
they type is determined by the architecture upon which they have
agreed. This discussion is about agreeing on the architechture.

-Peter

Oct 12 '05 #9
pe**********@yahoo.com wrote:
Carl,

Having recently started the planning stage of a project very similar to
yours, I am also quite interested in this subject. More in the
consolidation aspect of it than in the 'guideline' aspect.

How similar? If it is eCommerce then perhaps we could work together?
What do you mean by consolidation vs. guideline?


Actually, the final goal of my project is in fact an eCommerce
application. Ideally the minimalist 'framework' will be used to create
complete systems, including but not limited to eCommerce. I am still in
the pre-development planning stage, so I don't have any organized
examples to post at this time. The end result should facilitate creating
websites with management for modules that will provide the actual
functionality of the site.
IMO, the database abstraction _code_ should be handled in a fashion
similar to i18n, meaning that just as you would present text to a client
depending on the currently defined language context, the text(code)
presented to the DB should depend on the selected database context.

Say what? What is i18n?


i18n (internationalization) is used to be able to provide formats based
on the location of the end user. Language translations, number
formating, etc. My suggestion was that similar methods should be used,
seeing that different databases speak different languages. The breadth
of i18n is clearly not required though, and usually a Dictionary or
Translator class will suffice, simply returning the correct words based
on the current database context.

,Carl.
What exactly do you mean by a 'PHP class pattern'? Are you using one
'class' to handle all of your forms, or applying a pattern to each of
your forms.

I am applying a pattern to each form. I think it is neat, tidy and
flexible. It is easy to develop seperately the parts of a new form from
a blank form template. The form handling is about the only part of my
application that I am really happy with. Perhaps if we decide to have a
sample application I can explain more after strip the bells and
whistles from my code.

-Peter


Oct 12 '05 #10
NC
Carl wrote:
NC wrote:
Nikolas Hagelstein wrote:
i spend a lot of time on thinking and researching about
how to make developing webapplications with php a more
structured/systematic thing.
Why stop at development? Or, rather, why start in development?
Structure and system should be first introduced in sales and
implementation...


In not really sure that I understand what you are trying to argue
here, but I would argue that 'Sales' is not necessarily a factor
that needs to be considered in the context of this discussion,
and implementation is only one part of the development process.


I guess I wasn't clear... When I say "development", "sales",
or "implementation", I mean not development/deployment stages,
but groups of people within an organization who perform these
functions.

Most software organizations out there already have at least
one product, so whatever happens to development from now on is
a long-term issue of little immediate importance. The shorter
term issue, with much more urgency to it, is how to maximize
return on investment that has already been made in developing
the product. This is why I think that structure and system
should be first introduced in sales [team] and implementation
[team], because in great many cases it is already too late to
introduce them in the development [team].
Structure and system _should_ be 'introduced' (at the minimum)
well before implementation .
In a perfect world, yes. In the real world, it is often too late
for that; the product has already been released or is getting
close to it. So quite often your best bet is to introduce best
practices on the "business side" (sales team, implementation team,
support team, etc.) first and then implant them into development
of the next major release or perhaps even the next product.
I respectfully disgree. No matter how professional your
development is, your success will NOT be determined by the
quality of development. Whether or not your product uses MVC
(or another fashionable development technique) is of no
consequence to the buyer. The buyer wants to see the relevant
feature set (which is a design issue, ultimately rooted in
marketing), reasonable cost of ownership (which a purely
marketing issue), knowledgeable sales people and responsive
implementation people (which are human resources issues).


Again, you lost me.

.... Although you may /sometimes/ be correct in that 'success will
NOT be determined by the quality of development', you definition
of success and mine clearly differ. Proper design markedly
increases _your_ ability to work with, repair, modify and reuse
code in the future
Well, it appears that my definition of design also differs from
yours. :) Seriously, though, we seem to be concerned about
different aspects of design. To you, design appears to be mostly
about software architecture; I tend to focus on usability and
relevance to the end user's needs. Obviously, each approach has
its drawbacks. If you follow my suggestions to the extreme, you
may find yourself trying to address a need that cannot be addressed
with present-day technology (or perhaps, should be addressed by
means other than technology, such as training or organizational
changes). If I follow your suggestions to the extreme, I may end
up with a beautifully designed, but totally irrelevant to the
user's needs (and thus unsellable), piece of software... The
question is, which of the two diseases (pampering the user or
ignoring him) tends to strike more often?
Regarding your comment that there exists a design issue is
"ultimately rooted in marketing" has me perplexed.
Why? In your very next sentence, you agree with me:
The issue with design is implementing the feature set
determined by marketing,
This is exactly what I meant. Marketing suggests WHAT
should be implemented, designers decide HOW it should be
implemented. Somewhere in-between, there probably should
be a manager type who decides WHETHER and WHEN (given time
and cost considerations) a particular feature should be
implemented...
I think it's called PEAR; it includes code repository
(complete with dependency checks and defect tracking)
and coding guidelines...


PEAR is indeed one possible answer to the OP's question,


Ah, we are not so different after all... :)
though I think it is far from a complete solution.


But then, is any solution ever complete? :) Again, what
I like about PEAR is that it (1) offers coding guidelines,
(2) stores cataloged and (usually) documented code, and
(3) has a defect tracking system. Thus, I believe that
PEAR can be viewed as a working prototype for a company-
wide code management system...

Cheers,
NC

Oct 12 '05 #11
NC,

Uhhhhhh. Your throwing arm must be pretty strong from playing in left
field for so many years . . . I am totally perplexed.

Oct 13 '05 #12
NC
pe**********@yahoo.com wrote:
NC,

I'm not sure if you are thinking along the same lines as
Nikolas' proposal.
I am definitely thinking along the lines very different from
Nikolas' proposal. :)
He is talking about the overall application architecture.
Isn't PEAR only a set of components that can be connected
by inserting them into an application archeticture?
Exactly. So we can use whichever architecture we want, it
won't change much, since most of the functionality is already
implemented in the components.
I'm not sure why you disagree with Nikolas' proposal.
Because in my opinion it confuses goals with means. The
goal as I see it is to deliver usable software on time and
within a budget. Reusing code can help with time and
budget. So the company's code base must be well-documented
and be accessible through a searchable central repository.
This, in my opinion, is the important part. Whether this
code base adheres to MVC or any other development pattern
is (again, in my opinion) unimportant.
As you say, the buyer only cares about the feature set,
cost and responsive implementation. The last two are
products of the architecture.
Not really...

Cost is determined primarily by how much time developers
spent on the project, how well they were paid for that
time, and how expensive the third-party components were.
If the code base is centralized, well-documented, and
searchable, developers can save time by reusing code,
regardless of code's and developers' adherence to any
particular development paradigm. If, conversely, the code
base is dispersed, poorly documented, and not searchable,
developers would rather rewrite than reuse...

Responsiveness of implementation, in turn, is determined
by the quality of documentation and the quality of the
implementation staff training.
I think Nikolas' proposal is very valid because after the
sales pitch is successful the developers have to sit down
and type something.


You are obviously thinking in terms of custom development.
But custom development is not the only business model in
software. More often, you have a pre-packaged product that
requires extensive integration with other systems the client
already has in place. So you can only start pitching AFTER
you have the product. And the success of your sales pitch
in this situation is determined by how well you understand
the customer's legacy systems and how well your product can
integrate with those systems. The real work in this case
begins after closing the sale and has nothing to do with
development; an implementaion team is dispatched to the
customer's site to do installation, configuration, database
hookups, data conversions, etc. The bulk of revenue in this
case comes from implementation services, not from licensing;
development is just a fixed cost that needs to be spread over
as many implementations as possible...

Cheers,
NC

Oct 13 '05 #13
Hi NC,
I think Nikolas' proposal is very valid because after the
sales pitch is successful the developers have to sit down
and type something.


You are obviously thinking in terms of custom development.
But custom development is not the only business model in
software. More often, you have a pre-packaged product that
requires extensive integration with other systems the client
already has in place.


OK, now I better understand what you are writing about.

To you it is a pre-packaged product. To the developers of this product
it is a custom product that has an architecture. Every application is
custom according to someone. I think that is what this thread is about.
Developing a new product with an architecture that is easy to deal with
when installing/integrating/modifying.

Oct 13 '05 #14
> So we can use whichever architecture we want, it
won't change much, since most of the functionality is already
implemented in the components.


But we still have to decide which architecture we want to use. There
must be pros and cons to different architectures. For example hacking
together an application with html/css/php/sql/javascript/xml/xsl mixed
together in every file would be a poor architecture for a big
application. Probably MVC would be better.

Oct 13 '05 #15
> - An MVC -architecture framework (e.g MOJAVI)
From a day of poking around on the web, it looks like Mojavi is well

liked by many people. Many sites say it is the best MVC php
architecture around.

It looks like the Mojavi project organization was a little chaotic
earlier this year but now you would use Mojavi 2 for php4 apps or Agavi
0.9 for php5 apps. (The Agavi project is a fork of Mojavi 3 and when
Agavi 1.0 is released it will be the first stable release of Mojavi 3.)
Mojavi 4 is just starting.

Now I want to try to figure out how Agavi 0.9 works. It seems very
sophisticated with many design patterns and will take a while to
understand. Already I can see that user sessons and database
connections are handled differently than what I've used. There are many
third party products I haven't used (Phing, Propel, Creole). It looks
like I might end up starting writing my application again. Ugg. I wish
this thread started about 3 months ago! But if Mojavi is as great as
people say then this might be the last time I start over.

-Peter

Oct 13 '05 #16
> I even fancied to switch over to jsp since i heard all those
stiltedness rumors about it's professionalism/stability etc.


What kept you with PHP?

I don't know anything about JSP or ASP. Are they just different
languages to do the same things as PHP? Is JSP a compiled language?

-Peter

Oct 13 '05 #17
hi,

NC: i fully agree with you.
May be my comments where a little mistakable.
Lets assume the following (idealised) situation:
- there is the opportunity to start from scratch
- there is no existing product
- there is no existing codebase
- there is no model of software architecture

Now in that situation i am looking for a "toolkit"
(meanig a combination of software architecture model and helpertools
e.q.pear )
to develop usable,stable,flexibel software "on time and
within a budget." ;)

Cheers,
NIkolas

Oct 13 '05 #18
Carl,
consolidation aspect of it than in the 'guideline' aspect.

consolidation of knowledge and ideas is of course a thing we
are all interested in.
cheers,
nikolas

Oct 13 '05 #19
Hi,
Since database abstraction still seems to be a problem perhaps a good
solution is to use PEAR DB and then isolate all of the SQL so that it
is easy to work on. i agree...
I thought a comparison like this must exist. unfortunatly i seems as if it does not :<
Maybe the best thing for us to do would be to have a small sample
application that we could study and play with and set up different
ways. good idea
Maybe I could strip out a bunch of things from my application as
an example and then draw a diagram.

Yes that would be great ...

bye,
Nikolas

Oct 13 '05 #20
Peter,

[MOJAVI]
i tried at least 5 different MVC frameworks and most of them suffer
from the
attempt to port "JSPs struts" to PHP.
Mojavi does not and further more it's small an lightweight even if it's
project homepage
seems to be a little chaotic ;)
I wish this thread started about 3 months ago!

;)

bye,
Nikolas

Oct 13 '05 #21
>What kept you with PHP?
hmmm difficult to answer...
lets say: a mixture of laziness,habit and the will to find a solution
,)
I don't know anything about JSP or ASP

nor do i ....definitely not enought to answer this question completly
cheers,
Nikolas

Oct 13 '05 #22
Nikolas Hagelstein wrote:
<snip>
Anyway my current attitude is that fullfilling the following needs
would make application depvelopment via PHP a really
fast/professional/structured thing:
Kudos, at last some healthy interesting discussion in c.l.php:-)
Everyone start researching will end up in yet another framework (tm);-)
- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
In my perspective, templates and MVC is making the project high
complex. Even, if you just want to echo some texts, you have to do this
and that..., IMHO. Another thing to consider the fact that PHP is
interpreted language; and I have seen many hard coded DB
abstractions--and finally end up with phpBB like simple abstraction
that doesn't affect much of performance. Also,
<news:11**********************@g44g2000cwa.googleg roups.com> (
http://groups.google.com/group/comp....cb875afffebbe2 )

<snip> So what i want to know is:
- what is your prefered software/framework to fullfill the above
needs.?
My requirement was different and got end up with own framework,
coding standards (phpdoc) and as I said since PHP is interpreted,
abstractions are minimized; and as of now many codes are been automated
in another layer (with own codegen) so that the effective (PHP) code is
simple and fast.

<snip> Wouldn't it be nice to have something like the
"PHP professional webapplication development guidline" ?
containing:
- toolkits/frameworks
- techniques
- tutorials etc.


This is very harder. There are lots and lots of frameworks and
guidelines; all because of the dissatisfaction over other.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 13 '05 #23
NC,

NC wrote:

I guess I wasn't clear... When I say "development", "sales",
or "implementation", I mean not development/deployment stages,
but groups of people within an organization who perform these
functions.
If the development stage is the responsibility of the development group,
and the same applies to the sales and implementation stages/groups,
then, for the sake of this discussion the terms are interchangeable and
your clarification is not necessary. My problem is not with your exact
definition of 'sales', but rather why you think its relevant to this
discussion at all.

Most software organizations out there already have at least
one product, so whatever happens to development from now on is
a long-term issue of little immediate importance. The shorter
term issue, with much more urgency to it, is how to maximize
return on investment that has already been made in developing
the product. This is why I think that structure and system
should be first introduced in sales [team] and implementation
[team], because in great many cases it is already too late to
introduce them in the development [team].
Again, your totally off topic here. Please read the OP. This discussion
is about "developing webapplications", your observations on companies
with existing software are irrelevant, and your observations on ROI even
more so.

Additionally, i would like to ask why you would even have a sales team
if you have not developed (i.e. Development group/stage) a product?
Unless of course you are still thinking in terms of a company with an
existing product, which again, is not relevant to this discussion. You
may also want to consider that if you already have a product, the
development stage has clearly finished (you have a product, right?).

Structure and system _should_ be 'introduced' (at the minimum)
well before implementation .

In a perfect world, yes. In the real world, it is often too late
for that; the product has already been released or is getting
close to it. So quite often your best bet is to introduce best
practices on the "business side" (sales team, implementation team,
support team, etc.) first and then implant them into development
of the next major release or perhaps even the next product.


OK, another misunderstanding. Generally, application development
includes the initial development, and ongoing application maintenance.
You are talking about maintenance, not development (at least not in the
context of this discussion).
Your 'existing product' is a red herring, stop confusing the issue.
I respectfully disgree. No matter how professional your
development is, your success will NOT be determined by the
quality of development. Whether or not your product uses MVC
(or another fashionable development technique) is of no
consequence to the buyer. The buyer wants to see the relevant
feature set (which is a design issue, ultimately rooted in
marketing), reasonable cost of ownership (which a purely
marketing issue), knowledgeable sales people and responsive
implementation people (which are human resources issues).
Again, you lost me.


...
Although you may /sometimes/ be correct in that 'success will
NOT be determined by the quality of development', you definition
of success and mine clearly differ. Proper design markedly
increases _your_ ability to work with, repair, modify and reuse
code in the future

Well, it appears that my definition of design also differs from
yours. :) Seriously, though, we seem to be concerned about
different aspects of design. To you, design appears to be mostly
about software architecture; I tend to focus on usability and
relevance to the end user's needs. Obviously, each approach has
its drawbacks.


Wrong. You assume that my concern is "mostly about software
architecture". Software architecture means nothing when it is not used
to address a problem; or a requirement of the specifications if that
suites you better. We are trying to discuss software design, patterns,
etc. that can be used to solve common problems, nothing more.
If you follow my suggestions to the extreme, you
may find yourself trying to address a need that cannot be addressed
with present-day technology (or perhaps, should be addressed by
means other than technology, such as training or organizational
changes).
Yeah, tell the project architect, designer, marketing, or the end user
for that matter that you think that their request would be better
handled by better "training or organizational changes", and you will not
implement it. HA! I am begining to think you haven't tried this in the
RealWorld(tm) yet. Either that or your requirements were terribly out of
touch with reality. But again, this has nothing to do with the topic of
the OP.

HA, I'm still laughing...training... ;)
If I follow your suggestions to the extreme, I may end
up with a beautifully designed, but totally irrelevant to the
user's needs (and thus unsellable), piece of software... The
question is, which of the two diseases (pampering the user or
ignoring him) tends to strike more often?
Another assumption. The need for compromise between good design and
usability is your own invention.
There is no reason you cannot use a well thought out design pattern,
reusable libraries, application frameworks, etc. to implement usability.

Regarding your comment that there exists a design issue is
"ultimately rooted in marketing" has me perplexed.

Why? In your very next sentence, you agree with me:

The issue with design is implementing the feature set
determined by marketing,

This is exactly what I meant. Marketing suggests WHAT
should be implemented, designers decide HOW it should be
implemented. Somewhere in-between, there probably should
be a manager type who decides WHETHER and WHEN (given time
and cost considerations) a particular feature should be
implemented...


I think we are arguing apples an PEAR's here :)
Do not confuse the 'design' of the application (i.e. feature x, feature
y) with the design of the system (i.e. written in php, using db(x) for
storage, etc), aka the architecture, which is what this topic is about;
Implementing the feature x design (requirement) effectively through
application design (application architecture).
I think it's called PEAR; it includes code repository
(complete with dependency checks and defect tracking)
and coding guidelines...


PEAR is indeed one possible answer to the OP's question,

Ah, we are not so different after all... :)

though I think it is far from a complete solution.

But then, is any solution ever complete? :) Again, what
I like about PEAR is that it (1) offers coding guidelines,
(2) stores cataloged and (usually) documented code, and
(3) has a defect tracking system. Thus, I believe that
PEAR can be viewed as a working prototype for a company-
wide code management system...

Cheers,
NC


Cheer,
Carl.
Oct 13 '05 #24
Nikolas Hagelstein wrote:
....
Anyway my current attitude is that fullfilling the following needs
would make application depvelopment via PHP a really
fast/professional/structured thing:

- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
- disciplined/skilled Devloper ;)

These are of course not really new findings and
as we all know there are a lot of different implementions/combinations
of the above named out on the web.

So what i want to know is:
- what is your prefered software/framework to fullfill the above
needs.?
- For what purposal do you use them ?
- what are the advantages/disadvantages ?
Well, I wouldn't dream of working without a unit test framework. I have
written my own ( http://www.w-p.dds.nl/tinyunit.htm ), but there are
enough existing frameworks if you want.
As for database layers, I am writing my own as well. Started out as
individual classes, it is maturing to something that combines some nice
performance enhancements and data checking on the real database part and
some common inherited functionality on the lazy tablewrappers part.
I am building mostly multi-language sites now, and I have some standard
controls that work with my "feeding" of the language-dependent strings.

As I want my classes as simple as possible AND I want some specific
features, I don't work with any off-the-shelf code (yet).
Wouldn't it be nice to have something like the
"PHP professional webapplication development guidline" ?
A rough guideline, maybe. A lot depends on your personal taste. When I
visited the PEAR website and saw their coding standard, I decided to
stay away from it as far as possible.
containing:
- toolkits/frameworks
- techniques
- tutorials etc.
A bit outdated, but still valid: the lazy table wrappers are described
on http://www.w-p.dds.nl/article/wtrframe.htm
I think this is really worth thinking and talking about.

Cheers,
NIkolas


A nice tool I would want is a debugger. I downloaded a few of them, but
none of them work. Does anybody know a working one?

Best regards
Oct 13 '05 #25
Dikkie Dik wrote:
Nikolas Hagelstein wrote:
...
- An MVC -architecture framework (e.g MOJAVI)
- template parser (for View part)
- severall helper toolkits/frameworks
(DB abstraction layer/Form validation etc.)
- disciplined/skilled Devloper ;)

Well, I wouldn't dream of working without a unit test framework. I have
written my own ( http://www.w-p.dds.nl/tinyunit.htm ), but there are
enough existing frameworks if you want.
As for database layers, I am writing my own as well. Started out as
individual classes, it is maturing to something that combines some nice
performance enhancements and data checking on the real database part and
some common inherited functionality on the lazy tablewrappers part.
I am building mostly multi-language sites now, and I have some standard
controls that work with my "feeding" of the language-dependent strings.


Got to agree there. I would further and say the most fundamental thing thing
is a coding standard. A difficult thing to draw up until you're quite
familiar with a language - but the PEAR one is a good baseline.

A PHPDoc parser is essential too (I like PHPDocumentor).

Another useful PHP CASE is continious integration.

Regards frameworks - it's hard to write OO Webforms without falling into the
MVC pattern. When I reviewed what was available about a year ago and I
couldn't find anything which lent itself the task I was working on (low
volume, ERP type applications). So I wrote my own too!
(http://pfp-studio.sourceforge.net) although it approaches the problem
quite differently from a framework.

I must admit that Blue Shoes and Seagull both came quite close to what I
wanted.

Having written PfP Studio, I then found out that none of the template
systems I looked at would accomodate it easily (I wanted something a web
designer with NO coding experience could use) so I had to write one of
those too. Maybe this is why there are now so many template systems and
frameworks out there!

If you just want a slashdot type news site then your spoilt for choice among
the turn-key solutions already written! Sometimes customizing one of these
may be a better approach (I've had limited success with Mambo and
PostNuke).

Some components of a system go beyond what is available all but the most
complex of frameworks and may be better implemented elsewhere e.g.
authentication and navigation.

Db abstraction? I'd find it hard to justify anything more than ODBC or DBX.
And I find PEAR a bit rich for my diet.

A nice tool I would want is a debugger. I downloaded a few of them, but
none of them work. Does anybody know a working one?


I was quite impressed with Zend - although I don't really like the
post-Microsoft type IDEs (which I guess really started with Borland). These
days I prefer to embed instrumentation within my code which is handy when
its in production.

C.
Oct 13 '05 #26
Nikolas,
Maybe I could strip out a bunch of things from my application as
an example and then draw a diagram.

Yes that would be great ...


I'm going to hold of on doing that until I read more about Agavi. I am
especially interested in the database connection methods, form
validation and controller.

Oct 14 '05 #27
Hi,
I'm going to hold of on doing that until I read more about Agavi. I am
especially interested in the database connection methods, form
validation and controller.

Ok, please keep me informed if you gather any new findings....
bye,
Nikolas

Oct 14 '05 #28
Hi
written my own ( http://www.w-p.dds.nl/tinyunit.htm ), but there are
enough existing frameworks if you want. Thank you i will have a look at it.
Yes right there are a lot of exsisting frameworks this is exactly why i
started
this thread ;)
As for database layers, I am writing my own as well. Started out as
individual classes, it is maturing to something that combines some nice
performance enhancements and data checking on the real database part and
some common inherited functionality on the lazy tablewrappers part.
I am building mostly multi-language sites now, and I have some standard
controls that work with my "feeding" of the language-dependent strings.

sounds interessting could you provide a more deeper view to it?
bye,
NIKOLAS

Oct 14 '05 #29
Nikolas Hagelstein wrote:
As for database layers, I am writing my own as well. Started out as
individual classes, it is maturing to something that combines some nice
performance enhancements and data checking on the real database part and
some common inherited functionality on the lazy tablewrappers part.
I am building mostly multi-language sites now, and I have some standard
controls that work with my "feeding" of the language-dependent strings.


sounds interessting could you provide a more deeper view to it?
bye,
NIKOLAS

Most tables are represented by a lazy collection class. My "latest
trick" is to equip the collections with a ScheduleForLoad method. This
is used for objects I want to retrieve, but not right away. Whenever a
database action is necessary, the already scheduled objects are loaded
as well with a single SQL command. This is usually a HANDLER statement.
The table wrappers started out as single classes, but I am refactoring
them now to have a common superclass with abstract methods for object
creation. Yes, I'm using PHP5.
The table wrappers are held together by a backend object, that acts as
the root of the data layer. The backend object knows all table wrappers.
When I am finished generating a page, I only have to call the Dispose
method of the backend, as it propagates it throughout the whole backend
structure.
The frontend structure (the user interface) consists still of loose
classes and a controls collection, but it will be structure in the same
manner: a frontend object will hold the controls collection and can
generate new controls.
I am currenty dividing the controls in standard HTML controls and
"phrase-aware" controls that often extend from the HTML controls.
The multilanguage strings are "phrases": a sort of thoughts that are not
yet expressed in a language. They are in a table with only an ID field.
There is also a languages table, and a translations table with a
translation for each phrase and language.

Best regards
Oct 14 '05 #30
Hi there,

a friend of mine pointed the following links to me.

http://www.tonymarston.net/php-mysql...structure.html
http://phparch.com/issuedata/2003/jun/sample.php

regards,
Nikolas

Oct 16 '05 #31
Nikolas Hagelstein wrote:
Peter,

[MOJAVI]
i tried at least 5 different MVC frameworks and most of them suffer
from the
attempt to port "JSPs struts" to PHP.


Interesting, i never even looked into struts, so i guess this does not
hold for phpPeanuts. Anyhow, its first generation is older then struts,
so who is imititating who?

But OK, phpPeanuts is somewhat messy with respect to MVC. The trouble
is, MVC is a pattern for GUI's and was already there (Smalltalk 80,
VisualWorks) before OS's went graphical. Visual Smalltalk was built
later to fit better with Windows and OS/2 and did not explicitly include
the Controller any more, obviously becuase the OS did already take care
of most of its functions.

Furthermore, the MVC pattern is strongly connected with using event
handlers on the Model to handle events coming from the View. This adds
lots of flexibily in a situation where the abilities of the View
components are relatively fixed. This is generally the case with
traditional GUI libraries. But with HTML, there is much more freedom of
expression with respect to the Views.

At the same time the need for a design pattern to separate the graphical
side of View logic from application specific view population & refresh
has been eliminated: Nowadays the View components are the DOM objects
that live inside the browser. All events are channeled through a single
channel of HTTP requests, and in many cases large parts, if not all, of
the DOM is simply destroyed and replaced by new objects built from the
HTML that is produced by the serverside application.

Thenb why do we for Web Pages we still try to follow that same pattern?
I think some freedom of interpretation is necessary here. The main
purpose of MVC nowadays is to separate Lay Out from application logic.
And a small role is back for the Controller: to dispatch the single
stream of http requests to the right objects that should handle them.

Other problems have to be solved:
- the close coupling of url's to the web pages / types of the handling
objects makes specialization troublesome in an application that has
already been built (you have to changhe all the urls and forms that
inlcude the handler type). This is also the main reason not to use many
php scripts: you have to refer to them direcly in urls, if you refactor
part of a script to a different one, you find youself changing all those
urls. Customers do not ask for architecture, only for its reward:
flexibility.
- the web page is a too large unit for reuse of layout and user
interface logic. Smaller units are necessary, but do not come as
naturally as with GUI components, with HTML there is too much freedom
and too little ready-made funcionality. In other words, someone has to
develop the components, and they should to be smart in order to make
developers more productive. Becuase Customers DO ask for functionality,
not for nice software architecture.

PhpPeanuts solves these problems to a great extent. The examples prove
the separation between layout and user interface logic is very strong:
even if your app relies entirely on the default user interface, you can
entirly replace its layout. You can specialize many parts without
changing the urls. The heavy usage of meta data is like steroids for the
user interface components. Its flexibility helps to keep productivity
high with full-grown applications. It has been used by MetaClass for 6
real life applications. We have counted 1589 downloads since 15-3-2004
(not counting downloads of the examples and documentation). History of
earlier generations dates back to 1992 (Smalltalk, Java). And yeah, it
includes a unit testing tool too ;-)

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.

(Some images of one real life app are shown on
http://www.metaclass.nl/site/mc/Pagi...gistratie.html)
Oct 17 '05 #32
I too have been working on the subject for a long time.

all web MVC frameworks seem to be originating from struts, which seems
very successful. The reusability and modularity issues are best solved
with MVC for the web, in my opinion.

Looking upon .net and php, I always confronted jsp and J2ee, like you
have presented. Not only the good frameworks are on J2ee, but also the
developer is much more sophisticated.

In many php posts, such a subject appears rarely, but java related
discussion lists are full of these, where php users still try to tell
you about the sales issues, why bother, no need for architecture etc.

Maybe, php is the wrong place for people interested in such issues to
be, as most of the community is geared towards procedural programming.
The weird thing is, php 5's route, which is intersecting ours. Anyway,
php's drawback for such applciation development is not being a strong
typed language, I think.

For DBabstraction, there is nothing like hibernate for php, at least I
havent met.
Creole, propel etc is not bad, but doesnot supply what you need. You
need something like hibernate, or some framework implementing "domain
mapping design pattern" by martin fowler.

The logging, authorization, redirection, workflow infrastructure is
handled with Filters in J2ee presented in Core J2EE patterns by deepak
alur and used in dot net too.

Front controller can be used for such action, but, some filter chain
infrastructure using xml for chaining filters should be used, like
j2ee. As the client requests file, the request may call the front
controller which in turn calls the filter chain which reads the xml
file and gets what filters it should apply (logging, zipping,rewriting
adress etc), calling each filter then calling the page controller or
smth.

The validation could be done by the dotnet way, but struts has some
other solution for this, I have an incomplete module for form input and
validation, which uses some encapsulated php validation and javascript
validation completely seperated. Can inform more if interested.

There is too much to be worked on. The current frameworks for php is
INADEQUATE. Some serious framework should be studied upon,
investigating the structures from both J2EE and dotnet, even some older
technologies, using their design patterns.

I would be willing to participate in such a project.

Oct 18 '05 #33
Hi Weird-beard,

Because of this thread I've been looking into MVC frameworks for PHP.
It seems like in the whole professional world of PHP there is a lot of
borrowing from Java. I wonder why people want to borrow from Java
instead of just using Java. Maybe PHP users like me need to know more
about the world of Java. How is it different from PHP for web
development? compiled, strongly typed,...? Why do we choose PHP over
Java for mid to large size projects? Is it possible to develop
Apache/Mysql/Java apps in a free, open source way like using PHP on
Windows, OS X or Linux?

Thanks,
Peter

Oct 18 '05 #34
And web hosting costs and availability for a LAMJ stack?

Oct 18 '05 #35
Hi Peter,

Php is better then java becuase of its weak typing. Personally i am
about twice as productive coding in php versus in Java, simply becuase i
need so much less overhead code for typing, casting, exception handling
and interfaces.

Smalltalk has been weakly typed for a long time. OO as we know it today,
the GUI, garbage collection, the Virtual Machine, JIT compilers, they
where all developed in Smalltalk. All these ideas have been mimiced now
by Apple, Microsoft (windows, dot net) and Sun (Java). Yet you still
don't want to believe that the people who invented all this where
competent when they chose for weak typing?

For info see: http://ll1.ai.mit.edu/

"Several months ago, in the hallowed halls of MIT's legendary Artificial
Intelligence Lab, researchers Greg Sullivan and Mike Salib were
practicing a time-honored academic tradition complaining.

Why, they asked, are mainstream languages so conservative? Why had
interesting and useful research in areas such as garbage collection only
recently crept into mainstream languages? And why, they sulked, don't
language designers listen to academics? For that matter, why do
designers struggle to add features such as lexical scoping and closures
after the fact, when they should have designed these features into their
languages from the start?

To satisfy their curiosity and encourage collaboration between different
language communities, Sullivan and Salib organized the Lightweight
Languages Workshop" (Eugene Eric Kim, The MIT Lightweight Languages
Workshop, Dr. Dobb's Journal February 2002,
http://www.ddj.com/documents/ddj0202a/)

Or ask on comp.lang.smalltalk about why weak typing is better (not sure
you get many answers, they might think you are trolling ;-) )

Greetings,

Henk Verhoeven,
www.phpPeanuts.org,
www.metaclass.nl.

pe**********@yahoo.com wrote:
Hi Weird-beard,

Because of this thread I've been looking into MVC frameworks for PHP.
It seems like in the whole professional world of PHP there is a lot of
borrowing from Java. I wonder why people want to borrow from Java
instead of just using Java. Maybe PHP users like me need to know more
about the world of Java. How is it different from PHP for web
development? compiled, strongly typed,...? Why do we choose PHP over
Java for mid to large size projects? Is it possible to develop
Apache/Mysql/Java apps in a free, open source way like using PHP on
Windows, OS X or Linux?

Thanks,
Peter

Oct 18 '05 #36
I'm looking into Ruby on Rails. I've been convinced it is the hottest
thing going right now. Three things I already like:

Rails is the standard MVC framework for Ruby. The fact that a standard
framework exists is the part I like. A focused effort on one framework
is probably better than a choice between a bunch of 0.* version
frameworks. But I could be wrong about that.

There aren't supposed to be zillions of config files. Instead code is
based on conventions so that rails knows what things mean. I guess this
means file and class names.

The object relational model is integrated into rails and apparently
very slick.

And I got this info from a person working on a PHP MVC framework. He
said for any new project that doesn't have to be PHP he would choose
Ruby on Rails. So I'm going to spend a little time looking into it.
Seems like I start down one path and someone shows me another one but I
feel like I'm getting closer to howI should go about developing
professional web applications.

-Peter

Oct 19 '05 #37
Before someone tears into me. Nevermind that 0.* comment. Rails is 0.10

Oct 19 '05 #38
Peter,

Java is the ruler in all cool subjects nowadays. dotnet is too
borrowing a lot from java. Why not use java, instead just borrowing
from it ? Thats a question I ask myself too.

I might make some php coders angry with such talk, as I might be
seeming promoting java in a php forum, but I like php. I dont know why,
but I like it. Maybe the open source thing, not being tied or related
to any company or corporation, or open source projects written with it.
I just like it, and I want php to be better and more serious,to be
considered serious, not only on the open source community but also in
the commercial ones.
Learning java is one problem, I guess. Not the syntax, but the
infrastructure. J2EE, EJB, JDBC, Beans, Session Beans, JMS, JNDI and a
lot of buzzword starting with J. Its just though to know where to
start. whats tougher about learning java is learning to write java
efficiently, or learning to need it.

As such discussions or hours of searching makes you familiar with
concepts such as MVC, php users rarely see that stuff or are interested
in. You must crave for smth before you learn it. There are concepts
such as MVC, design patterns, persistence layers, abstraction layers, n
layered application, unit testing et etc etc. As a minority of advanced
php coders know or care about the subjects, almost every java coder has
smth to say on these. So, there is a lot more info, as the users are
much more knowledgable about the general aspects such as frameworks.

Even dotnet users does not have these skills.

Comparing it to php,
Advantages
- Php is easy to learn and code
- Can do alot of things in php easily
- There are a lot of resources available
- There are a lot of modules and open source projects,
- Code written by alot of people is available on the web
- It is really faster to code in php
- Weak typed, so things are easier to do
Disadvantages
- the community is interested about 'easy to learn and code' concept
- We want to do things easily
- We are not very much aware of new subjects.
- As has not been accepted yet by corporates, no or very small amount
of big projects done with php
- The developers are beginner to intermediate level, a few software
architects interested in php, the community in general lacks knowledge
- weak typed, so for eg you can pass anything as a parameter into the
function, crippling encapsulation, using any object for an attribute in
a class etc.

I dont care if strong typed languages takes more to code. I care about
the bug fix, the reusability. I think that code has to force me into
doing smth that I previously wanted myself or other fellow to do like
it.

Php has made a move towards that in 5.0, giving you the chance to
define the classes of the parameters to a function.

Yes, it takes a lot more in strong typed languages, casting,
inheriting, declaring abstract classes and such. But, it gives you alot
more control, when designing huge systems.

Peter, onto the other questions, the biggest plus of java is its
community I think. There are a lot of mvc frameworks for java, each
being used in commercial projects for a long time. Yes, it is possible
to develop Java apps for free. You need Eclipse as IDE, JBoss as
Appserver (or Apache Tomcat) and Mysql or anyth. Why do we choose php ?
Cause using java only makes sense when you need some other aspects of
programming. The best framework for MVC is struts written in java for
java, for eg. If I do not know what MVC is, why bother ? So first I
need to know whats available in software engineering.

But, a huge but here, I do not thnik the language matters. I think it
matters how you code. There are a lot of successful studies and
projects for php, and will be more and more, 5.0 has accelerated the
community and people like me have started to investigate subjects as
design patterns. Soon php coders will too be let into the community of
serious developers. Some of current php users are really annoyed from
the path that php is changing to, as they are very furious about the
5.0 's oop features. I dont know the percentage.

Anyway, phyton and ruby draws a lot of attention nowadays, at least
mine.
-
pe**********@yahoo.com wrote:
Hi Weird-beard,

Because of this thread I've been looking into MVC frameworks for PHP.
It seems like in the whole professional world of PHP there is a lot of
borrowing from Java. I wonder why people want to borrow from Java
instead of just using Java. Maybe PHP users like me need to know more
about the world of Java. How is it different from PHP for web
development? compiled, strongly typed,...? Why do we choose PHP over
Java for mid to large size projects? Is it possible to develop
Apache/Mysql/Java apps in a free, open source way like using PHP on
Windows, OS X or Linux?

Thanks,
Peter


Oct 19 '05 #39

Weird-beard schrieb:
from java. Why not use java, instead just borrowing
from it ? Thats a question I ask myself too. yes me too !

Learning java is one problem, I guess. Not the syntax, but the
infrastructure. That is definitive the most profoundly aspect making me hesitant to
switch
over to JSP/java -> the infrastructur.
But meanwhile i really wonder if i had better start learning JSP
instead of
spendig that much time looking vor a passable PHP solution :|
MVC, php users rarely see that stuff or are interested
in. yes indeed !
Disadvantages
- the community is interested about 'easy to learn and code' concept ^^^^ thats the point
architects interested in php, the community in general lacks knowledge

yes thats why most questions in php usergroups about handcraft stuff
like "how to open a file" da da..

cheers,
Nikolas

Oct 19 '05 #40
Weird-beard wrote:
<snip>
Disadvantages
- the community is interested about 'easy to learn and code' concept
- We want to do things easily
- We are not very much aware of new subjects.
- As has not been accepted yet by corporates, no or very small amount
of big projects done with php
- The developers are beginner to intermediate level, a few software
architects interested in php, the community in general lacks knowledge <snip> Some of current php users are really annoyed from
the path that php is changing to, as they are very furious about the
5.0 's oop features. I dont know the percentage.


I would agree with many things you said. But, c.l.php != PHP
community. Here, we get lot of newbies and many discussions are
unfortunately redundant. And many people like you're not visiting here
often. Even some well known PHP guys who visited here (like Marcus) are
not here these days. If you go to php.* groups, you may find such
users, discussions, plonking, etc (Here in c.l.php, we don't plonk and
it's totally different saint community:-)).

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 19 '05 #41
Rajesh,

Could you please give me the name of such groups ? I seem to be having
trouble finding them.

Thanks.

Oct 19 '05 #42
Rajesh,

could you please give me the name of one of such groups ? I seem to be
having trouble with finding such users for php.

Thanks.

Oct 19 '05 #43
Weird-beard wrote:
Rajesh,

Could you please give me the name of such groups ? I seem to be having
trouble finding them.


news:php.*; now a days not accessible via GG. You can find it here
<http://www.php.net/mailing-lists.php> FYI, IIRC, you have to provide
valid email address and activate it so that you'll be registered.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Oct 19 '05 #44
Peter,

what do you think about putting togehter a small sample application
and implementing it using different frameworks?
I will put together a small one this weekend and publish further
information on monday.

I interessted in the following frameworks:
-Mojavi
-Phrame
-Prado
-symfony

It would be great if those who are already using one of the above
frameworks could contribute an implementation using their framework.

What do you think?
Cheers,
Nikolas

Oct 20 '05 #45
I would be interested in such a study. But, what info will be measured
? Can you measure reusability etc ? I think all of the study must be
done by one person or a group, so that comparison could be easier.

Oct 20 '05 #46
Hi,
I would be interested in such a study. But, what info will be measured
? Can you measure reusability etc ? to keep things easy just consider it as an overview of how the same
task is done by using different toolkits
I think all of the study must be
done by one person or a group, so that comparison could be easier.

ideally yes but i think that is'nt passable. Due to the multitude of
existing frameworks.
bye,
Nikolas

Oct 20 '05 #47
Hi Nikolas,

I've already learned a lot from this thread and I think your idea is a
great one. I'm still interested in why people choose PHP for new
projects. I mean that as an unbiased question. I'm not looking for the
academically correct framework. No framework will be the best in all
cases. I'm just looking for one good framework that makes it easy for
me to get started, is flexible, speeds development and has active
community support. A framework with few quirks but the quirks it has
are workable. Maybe some my details are incorrect but these are the
impressions I have been getting

The ASP and .NET framework is for those loyal to Microsoft or those
without a choice. The ASP code I've seen looks clumsy. Dot net must run
on a Microsoft server. I'm not going to learn this option.

The JSP frameworks seem like they are also for people that like to be
part of the establishment or those without a choice. Also the Java
world seems a little stuck on itself: Java is the "right" way to do
everything. For some reason this option seems to have a big barrior to
getting started.

The PHP frameworks that have been around for a while seem like using
Linux. You have to choose all the options you want, compile the kernel,
hope everything works well together, and even after years some drivers
are still not avalible. It is frustrating to sort through all of this.
Some of the "better" of the older PHP frameworks seem to take a lot of
idea from the Java frameworks. (Why not just use Java then? Ok strongly
typed,... there are reasons.)

The newer PHP frameworks like CakePHP and Symfony and maybe Mojavi 4
want to be the Rails of the PHP world. Some PHP users can't leave for
another language but I have no reason to stick with a certain language
if the tools in another language are better. If this is the direction
that PHP users are going then I think I should learn at least a little
about Rails.

So on the advice of some converted PHP framework developers, I've ended
up learning a little about Ruby on Rails in the last few days. It is
great so far. It is so easy to use. The Rails package is a unified
framework. It has all the tools for ORM, unit testing, validation,
templating all worked in. The community is very active and growing
fast. Rails seems to be living up to its advertised strengths of
reducing development time. Over all if the other options are like
choosing Windows or Linux then Rails is like choosing OS X*. What I
mean is maybe there are slightly better components out there for
certain parts of the framework but as a whole the Rails components are
tightly integrated. I like the fact that the community is largely
behind this one framework. Maybe as time passes the community will
split but for now it seems unified. Rails was so easy to set up. In
fact, less that two hours with Rails had me thinking I should ditch PHP
right away. I have ordered a book about using Rails and can't wait for
it to arrive. That's right, a book. A book exists. Is there a PHP
framework with a book? Documentation is a big part of the marketing and
success of a software product.

So I have based my investigation on the experience of others. What you
are suggesting would formalize this type of investigation. It is a
great idea. It would be a lot of work. This would be cool. Specify a
sample app that would be written in each language/framework. The sample
app would involve a database, forms, validation, unit testing. Invite
an expert to write a tutorial for the app for their framework. Have
someone that has never used two of the frameworks to follow the
tutorials for each. Winning framework, based on opinion, advances. Like
hockey playoffs. Another option if you had more willing people would be
a round robin tournament. Another option that could be used alone or in
combination with one of these would having a standardized way of
reviewing the frameworks.

How difficult is it to set up a development computer for the framework
on OS X, Linux, Windows?
How many characters must be typed to implement the sample app?
How many lines of code must be written to implement?
How many files must be touched to implement?
What is the average execution speed of a page request (need a standard
server)?

So there are a bunch of thoughts but I don't know if they are really
necessary. If experienced coders are moving to Rails in big numbers
then that is your comparison experiment right there. They are moving
because individually they see Rails as a better framework overall. So
much better that it is even worth them leaving their comfortable old
language and learning Ruby which they also say is better. I want to use
an existing framework because I don't want to reinvent the wheel. I'm
trying to listen to others experience because slowly repeating their
process of ending up using Rails is like reinventing the wheel too.

-Peter

*Over the years I have tried Windows and Linux and am much happier with
my OS X system

Oct 20 '05 #48
hi
Specify a sample app that would be written in each language/framework.
The sample app would involve a database, forms, validation, unit testing.
Invite an expert to write a tutorial for the app for their framework.
Have someone that has never used two of the frameworks to follow the
tutorials for each.

This is exactly what i was thinking about ...no matter if its language
comprehensive
or not.
Just givin an overview of what exists,what is used and how it works.
Giving interessted people the opportunity to choice what ever fits
their needs and affectations.
As mentioned before i will put together a small sample application
which will hopefully cover the most importend aspects.
But lets keep things simple for the 1 step. Having a small comparison
is much better than having tons of academic ideas/aspects but nothing
real existing.
bye,
Nikolas

Oct 20 '05 #49
Nikolas,

I think the sample app has to be at least complex enough to test the
main features that people want in a framework: form validation, unit
testing, athentication, etc. If the sample app is only a little more
than "hello, world" then the good and mediocre frameworks will come out
the same. If there are no objective measures then I think the
comparison results will be dismissed by most people.

Maybe this could be run like a yearly competition. Each year the sample
app is updated to refelect the way people want to work. Get some prize
money to support the winning project or something.

Peter

Oct 20 '05 #50

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by The Count | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.