hi According to your terminology,
i think you have used Spring framework with hibernate in java or another framework In symfony, you first define your model layer schema in schema.yml then you can use propel or doctrine as a ORM to generate your model layer i have used Propel so in propel, it will create your model layer (containg getters and setters and CRUD operation and some other important functions) in om folder it also provides two custom classes per table to implement your custom business logic. On Mon, Feb 1, 2010 at 5:46 AM, Tom Ptacnik <[email protected]> wrote: > Hi, > > I want to ask you where you put complex application code when > developing with symfony (some bigger applications). > > When I don't develope with symfony faramework I've got this tiers: > > - Model classes (only beans - attributes and getters setters, this > class doesn't do anything by itself) > - DAO classes - store Models into database, creating models from > database ( add(), edit(), delete(), list(), ....) > - Application classes - application code - the logic of the > application which isn't suitable (too big/complicated, or wanted to be > reused) for controllers > - what to do when deleting object (e.g. I want to send an email > before, and delete two images), adding objects... > - application of user restrictions while accesing to the objects - > using DAO classes for accesing into database > - many methods names are same as those in DAO classes - insert(), > edit(), delete()..., but many of them do much more logic before > calling methods from DAO class > - Controllers - they create an application logic - call the methods of > the Application classes and send some objects and variables into > teplates (controllers call only Application classes, never DAO classes > directly) > - Templates (classic templates) > > So it's: Templates - Controllers - Application classes - DAO , and > this all tiers use a Model objects > > > In symfony it's: Templates - Controllers - Model(objects and table > classes) > > If I have a simple application it's ok to put all app code into the > Models, but if I want to create a little bigger application I'm afraid > of "too fat Models" ... > > Where do you store more complicated application logic? Do you have it > all in the Models? > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en. > > -- Regards, Dheeraj -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
