TomatoCart

65381 Downloads
277 users online
TomatoCart Community
Welcome, Guest
Please Login or Register.    Lost Password?
Bookmark and Share

Keeping view seperated from core files
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Keeping view seperated from core files
#2625
Keeping view seperated from core files 1 Year, 5 Months ago Karma: 1
Hello,

It would be good to have a separation between core and view files. Sometimes there are things rendered within the core classes of tomatocart. like an example:

/includes/classes/product.php

You can find a renderProductVariant method here. This causes 2 problems

  • It makes things difficult to create templates if you have to search the core files for layout stuff

  • If you modify it, it could be a potential problem when upgrading (you can upgrade but you get conflicts)



A better approach would be to do everything layout in the layout directory and just work with the models classes there. So none of the model classes contains layout info. This way it will be more flexible and people just can deliver a folder instead of some core files that need to be overwritten and a folder.

I think it's a good practice to always keep everything that is layout depended in the layout dirs.

Greets,
Ward Loockx
E-volutions
Gold Boarder
Posts: 294
graphgraph
User Offline Click here to see the profile of this user
Gender: Male TomatocartHosting ward@e-volutions.be Location: Belgium, Leuven

TomatocartHosting launching soon!


The administrator has disabled public write access.
 
#2636
Re:Keeping view seperated from core files 1 Year, 5 Months ago Karma: 12
I totally vote for this!
xonium
Gold Boarder
Posts: 183
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Sweden
The administrator has disabled public write access.
 
Go to top Page: 1
Moderators: mkorayt, GuyaneseG

Latest Blog Post

TomatoCart v2.0 – An open source ecommerce framework

Since the TomatoCart v1.0’s framework getting old and the core is not a pure MVC design, it causes many troubles ...

Blog | Administrator | Saturday, 21 January 2012

More in: About Us

-
+
3

contact_us

TomatoCart
+86-13771170725
info@tomatocart.com
http://www.tomatocart.com

Newsletter Subscription

Name:

E-Mail:

Verification Code:
Captcha

Receive HTML?