Topic: Application architecture?? MVC??

Hi there, I am brand new to FA but I have some experience with WebERP.  My company is in the process of completely rewriting the front end of WebERP to a more user friendly design.  In doing the research for this project, I found out about FA from Wikipedia http://en.wikipedia.org/wiki/FrontAccounting.

The thing that interested me most were the statements about:

# Clean separation of database access and business logic from user interface routines.
# Separated ui framework and code reuse ensure consistency of modules and easy development of extensions.

However, when I look at a random program, I see the SQL statements mixed in with the HTML view logic??  Am I missing something?  I was hoping to see a total separation into a MVC type architecture, which would of course make my life a lot easier in building a new front end.

I subscribed to the developer forum, but I'm not sure how to search it to see if this issue has been discussed.

Any ideas or comments are appreciated.

Re: Application architecture?? MVC??

Yes, as of  FA 2.2.7 some sql statements are still placed inside files responsible for business logic. In next (2.3) release all sql statement are moved to respective database related files under */includes/db directory. We have not decided to follow strict MVC approach, but we use the best part of this pattern, I think. Model part is cleanly separated in next version, but view/controller parts are still mostly placed together to make whole source better readible. They in fact does not need separation, as all gui controls are drawn with helper functions which make php source compact and easy to understand. Eventually you can consider files under /includes/ui directory as a framework for view part of MVC model.

FrontAccounting lacks some functionality of webERP like inventory serial control, but if you need it,  it is much easier to add it to FA than rewrite webERP sources smile.

Janusz

Re: Application architecture?? MVC??

Thanks for your response.  Sorry for the newbee questions, but is there a timeline for V2.3?  Is there a data model available for a starting point?  If it is reasonably simple to create a new UI, we will open source the product if the community participates in the design and implementation.

Also, for anyone else reading this, any other ideas on creating a new front end are appreciated.

Re: Application architecture?? MVC??

Hello, there is an ER-diagram available for download on the Download page - Download Documentation. To satisfy the Model part of MVC. As Janusz describes, it is our intention to have all the html writing to be included in /includes/ui files. Most are there, but still some minor parts need to be rearranged. To satisfy the View part of the MVC.
The rest of the page php files are the Controller part and is setup in a logical way according to the menu-system. They communicate wisely with the Model and View part through the API.
Then there is a more sophisticated access control system implemented and much more.
It seems very ambitious to start rewriting an ERP application, especially when we are so close as we are smile

/Joe

Re: Application architecture?? MVC??

'Ambitious' is very kind, more like 'insane'!  How close is the new version? 

Some backstory.  Management wanted to move away from Quickbooks because it wasn't meeting our need.  They wanted me to develop a new system that would accommodate our various businesses (e-commerce, construction, services, etc).  I looked around the net and found webERP and wanted to use that as the backend DB.  We have actually implemented a production system that uses ExtJS for the front end and automatically gets our data feeds from eBay, our other e-commerce systems, our vendors, credit card processors, etc.  It uses webERP for the DB and is working pretty well for our internal order processing system.

Our next project 'may' be to go towards a much more sophisticated frontend similar to http://www.extjs.com/blog/2010/04/08/implementation-spotlight-xero/ and possible market it or customization services for it.  So thats why I am very interested in a 'clean' system that would make the implementation of a new UI much easier ;-)

Re: Application architecture?? MVC??

Well, I'm not sure what is the sense in rewriting the user interface to as exotic library as extjs? I guess the only expected effect is much bigger hardware requirements on every box used on client side, while the input performance would be suffered by lack of full keyboard based interface.  Isn't it better to devote the time and resources to provide all those important ERP features FA lacks so far? Or I missed something...

Janusz

Re: Application architecture?? MVC??

Hi there, the basic issue is that our users refuse to use webERP because its god-awful to look at.  Our management agrees and they can't use it either so that's why I built the front end using ExtJS.  ExtJS is not as bad as it seems.  I built custom distros of it that only uses the pieces that we need so the footprint/hardware requirements is very small.  I also implemented some keyboard shortcuts but that wasn't a requirement for us. 

FA is an improvement in the UI, but again, our users are used to the friendly UI of Quckbooks and find webERP/FA too difficult to navigate.  Please don't take that personally, I'm a techy and totally comfortable with command line etc. but I don't make the decisions for my company ;-).

Re: Application architecture?? MVC??

Not a problem at all. I'm just curious whether business logic implemented by FA includes all needed features, and javascript rings and whistles are all what they need  to be happy. If the customer want to pay enough the UI to FA database can be made even in VBA or using OpenOffice documents as an interface. This is just matter of time and money smile.

Janusz

Re: Application architecture?? MVC??

Royce wrote:

Hi there, the basic issue is that our users refuse to use webERP because its god-awful to look at.  Our management agrees and they can't use it either so that's why I built the front end using ExtJS.  ExtJS is not as bad as it seems.  I built custom distros of it that only uses the pieces that we need so the footprint/hardware requirements is very small.  I also implemented some keyboard shortcuts but that wasn't a requirement for us. 

FA is an improvement in the UI, but again, our users are used to the friendly UI of Quckbooks and find webERP/FA too difficult to navigate.  Please don't take that personally, I'm a techy and totally comfortable with command line etc. but I don't make the decisions for my company ;-).

I'm sure I don't need to mention that as webERP is released under the GPL, you would have to release your enhancements under the same license.

Tim