I'm developing a web community in CakePHP and started to have doubts about using jQuery to provide useful widgets around the views when needed.
For example, I've wrote a jQuery plugin which searches the data inside specific input text, asks to my database and get the results handled with events.
Basically the plugin is perfect for simple applications but it's basically useless for a community where I use it almost in all the views and every time handling it with different events and methods, making it with huge event declarations and very annoying to be debugged.
This is just the first of a lot of plugins I'll need to use inside the community, because I would like to have a lot of widgets all around user actions in the site without refreshing the page for small changes.
After some search I thought to solve my problem by implementing a JavaScript MVC based framework inside my web application.
After a read of this article I thought Ember.js would be a nice solution but it seems to be a JavaScript full Application which should be used entirely all over the website than a JavaScript library built to support my CakePHP app (also an MVC framework)
Also does exists some specific framework useful to build reusable widgets?
If I had to do something similar, I'd implement the JS lib for use on layout level (instead of specific view). I'd pick 2 cases - one with the simplest scenario and one with a more complex use case. Then note what are the similarities and differences. That at least would give me a baseline for decision if it's worth pursuing further and would expose the extent to which it will have to be complex.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With