Re: Re: frameworks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Butera wrote:
> On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie <nospam@xxxxxxxxxxxxx> wrote:
>   
>> Eric Butera wrote:
>>     
>>> On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson <kevin@xxxxxxxxx> wrote:
>>>       
>>>> On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote:
>>>>         
>>>>>  From what I could tell, this was
>>>>> the best RAD, however if you prefer to lay everything out your own way
>>>>> and do things your own way then probably CI or Zend.
>>>>>           
>>>> I use Zend every day in my current employ.
>>>> It is like pulling teeth and its feature set is not as rich as
>>>> they would have you believe.
>>>> Zend DB is pathetic
>>>> Zend Form (although not from Zend itself) is abstraction for
>>>> abstractions sake and is mind numbingly complex.
>>>> The lack of a model loader is laughable.
>>>> The list goes but you get the point, this is supposed to be from
>>>> "the makers of PHP" and is supposed to be a mature framework and
>>>> ready for enterprise level applications.
>>>> What a joke.
>>>>
>>>> but, just my $0.02
>>>> Kevin
>>>>
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>>>         
>>> And what exactly do you expect for the model layer?  That's the part
>>> you are supposed to write on your own.
>>>
>>>       
>> Supposed to?  Who says?  The DB yes, but if you design the DB correctly
>> and want your models tightly coupled with the DB, then it is an useless
>> step to create the model yourself.
>>
>> Zend has a Zend_Tool script in the incubator that does project and some
>> code gen.  Reading the plans they plan to include model generation as
>> well.  It will probably be a while in coming though.
>>
>> To me, right now Zend is just a more professional and consistent PEAR,
>> but with fewer features.
>>
>> --
>> Thanks!
>> -Shawn
>> http://www.spidean.com
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>     
>
> Model != database.  I made this mistake for years, but no more!  :)
> Models can persist data, but a model is supposed to be the business
> logic of your app.  It's a set of rules.  So how could any tool
> generate your app for you is/was my point.
>
> Take an ecommerce example.  You might have a product in the database,
> but calculating it's price based on categories, sale prices, etc isn't
> something that a database is going to do.  That is your app's logic &
> is part of your model.  The model can ask the DB for all that static
> info about pricing, but it makes the determination as to what the
> price is.
>
> What about when you want to add a product to the cart?  Where would
> you ask the code if that product is already in the cart?  Just all
> those types of things...
>
>   

I understand and agree.  I'm by no means a hardcore OOP guy, or even a
professional developer.  What I should have said was that a "base"
model  is generated for each table describing your table, fields,
relations, validations etc. and providing some base methods (find,
findAll, etc.).  You still need to add your business logic, extra
methods and any validation logic that the code gen doesn't do for you. 
These base models are easily extended and there are many callbacks that
you can create in the model (before and after, find, save, validate,
etc...).

So what I meant was that it creates a working skeleton application that
works with your DB.  You then need to build your actual functionality,
includes business logic.  To me this is RAD, and rad :-)

Thanks!
-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux