Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: [Finished]Clean up models separate view from logic
2010/03/05 10:00 #6026
[Finished]Clean up models separate view from logic Print this page
Hi there,

looking into model file product.php in frontend part od redShop remindes Virtuemart to me. Mix of PHP, HTML and inline styles in spaggetti form.

Tons of IFs, FOREACHs that could be puted in separate methods, maybe somewhere in helper. But this is your logic, I'm not going to edit that ;-)

But what I want to have possiblity to modify is template... But how with this in model?

Code:

<div style="float:left;width:500px;margin-left:-10px;border:0px solid #ff0000;">


or

Code:

<div style='margin:0px;padding:7px;' class='accessory_image


or other milions of line with inline styles and code! You can't be serious about this. Let's roll back into virtuemart with new component written from scratch?

Even if there's no inline style, there should not be even pure semantic html code, it's a MODEL guys! Application logic, not view....

Hope this is just some "Alpha state" of code and it's there just becouse you are busy with another work and it's in tracker for next releases already.... becouse if not, I'm considering to try a luck in another house, real MVC house (this post is a little bit related to one I've posted before - moving templates to files)....

Or did I miss something?
Last Edit: 2010/04/30 14:54 By admin.
Offline
The administrator has disabled public write access. Top
Jan Prokes
 
Gold Boarder
Posts: 201
graphgraph
2010/03/05 16:52 #6046
Re: Clean up models - separate view from logic Print this page
We redid the entire templating parts for related products, accessory products, additional images and all those sorts of things that can be edited in the template system in the last 2 months - what you have found id left overs from the old "proof of concept" ways before we moved into dynamical approaches through the templating system.

The inline CSS is going out over the next few weeks entirely.
Last Edit: 2010/03/05 16:55 By admin.
Offline
The administrator has disabled public write access. Top
Ronni Christiansen
 
Administrator
Posts: 2889
graph
2010/03/05 18:53 #6051
Re:Clean up models - separate view from logic Print this page
Ok, makes me calmer ;-)
Offline
The administrator has disabled public write access. Top
Jan Prokes
 
Gold Boarder
Posts: 201
graphgraph
Go to topPage: 1