Hey Bill,

Either way (allowing partial commits or not), the bean is still going
to be fetched and populated - that's just kind of the breaks of
dealing with things as objects instead of writing ad-hoc SQL.  It's
not as granular, but it's also more powerful.

If you do allow a partial commit from the "settings" interface for the
project, you'd likely have something like this (assuming Model-Glue
(or Mach-II) event-bean utility):

project = project.load(projectId=projectId)
project.makeEventBean(project)
project.save("settingOne,settingTwo")

Without a partial commit, it'd just be this:

project = project.load(projectId=projectId)
project.makeEventBean(project)
project.save()

That'd execute the (slightly more efficient) "partial" SQL that just
updates settingOne and settingTwo.  However, it's violating the DRY
(don't repeat yourself) principle that frameworks like Reactor help
implement.  If you don't allow partial commits, you can add
settingThree by just adding a new database column and UI:  the "full
stack" nature of combining Reactor with Model-Glue or Mach-II makes
this possible, because your Controller code doesn't know anything
about columns.

In the end, everything's a tradeoff.

-Joe



--
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com

Reply via email to