entity Posted July 6, 2011 Share Posted July 6, 2011 Hello Forum, So I've been doing a project lately where I have the business end of things in a module and the GUI of this particular software in another module (2 separate files in the same project), I was wondering what the best way to interface the two modules is, are custom event firing/handling the way to go or does anyone have any other (more efficient) way of doing the latter mention. The person wanting the software needed it to work in both an offline mode (local) and also in the form of a web-based front-end solution, which is why I needed to loosely couple the previously mentioned two modules. Thanks in advance, Entity Quote Link to comment Share on other sites More sharing options...
Sparda Posted July 6, 2011 Share Posted July 6, 2011 This is exactly what J2EE is for. Quote Link to comment Share on other sites More sharing options...
Sitwon Posted July 6, 2011 Share Posted July 6, 2011 Hello Forum, So I've been doing a project lately where I have the business end of things in a module and the GUI of this particular software in another module (2 separate files in the same project), I was wondering what the best way to interface the two modules is, are custom event firing/handling the way to go or does anyone have any other (more efficient) way of doing the latter mention. The person wanting the software needed it to work in both an offline mode (local) and also in the form of a web-based front-end solution, which is why I needed to loosely couple the previously mentioned two modules. Thanks in advance, Entity The exact strategy will vary depending on the project. Event handing is one of many valid strategies. In general, you want to make your interfaces as simple and obvious as possible without oversimplifying them. Quote Link to comment Share on other sites More sharing options...
entity Posted July 6, 2011 Author Share Posted July 6, 2011 Thanks for the replies will give it a shot with events then and see how it goes :) and yes Sparda same code for both ends really saves time :-) Entity Quote Link to comment Share on other sites More sharing options...
niels Posted July 6, 2011 Share Posted July 6, 2011 Maybe you should take a look at the Observer Pattern, that's a possible solution. Or try an MVC kind of approach but like Sitwon said. It al depends an you're requirements. Quote Link to comment Share on other sites More sharing options...
entity Posted July 7, 2011 Author Share Posted July 7, 2011 Observer Pattern that's what I'm using atm :) Thanks for the feedback :) Entity Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.