Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Best practice to integrate own business logic in GS
#1
Question 
I'm new to GS (just testing it) and I would like to know, what is the best practice to integrate own business logic in GS?

In the MVC pattern that would be the business model, e.g. data input from website user to store in MySQL DB (or would you store that in xml-files?), edit and update the data and perhaps delete it (CRUD). There may be some more data relations and data filtering to view them on selected pages (of GS). 
The important point is to catch the requests from the user and show the retrieved data on the website.
The logic is written in PHP and now I want to know whether you would write a plugin for that, integrate it in a new theme or what would you suggest as solution for this? Undecided

Regards
Tom
Reply
#2
May be posted in the wrong forum, so Admin please move it to the right one. Thank's.
Reply
#3
It depends on the logic of the script/application, there's more than one way to achieve this, I would move the logic into a plugin and put View and Controller into theme (you could expand it by having multiple View/Controller files). But, sometimes, if I want more control over routing, for example, I put my Controller and Router with in the plugin, it allows you to hook into running processes.

As you will probably have to handle a lot of data, I would use a proper database on your place. Databases can handle very complicated queries, and with ORM it gives you the ability to manipulate data in a very friendly way, etc...
Reply
#4
@Bigin Thank you for your answer. That are useful information for me. So I can see clearer now what approach I will take. Thank's Smile


Regards 
Tom
Reply
#5
If you want something more agile use my component hook plugin to execute code on any hook using components instead of writing a plugin
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)