HMVC and Cjax

#11
[eluser]jonez[/eluser]
[quote author="Ajaxboy" date="1402257901"]@jonez,

Second, to address the response from jonez,

1. No Cjax does not have any dependencies on any JS library, or any other dependencies whatsoever. (Cjax has it's own)

2. "JS has no place in PHP code",
Cjax is not just any JS library. It is a ecosystem of finely built integration of PHP bridge for JS. There is no actual JS code inside your PHP, It is 100% PHP. So I think you should take your time to investigate a little.[/quote]
I'll probably come off as a douche, but here's my thoughts. If you are new to JS/AJAX and use CI exclusively this library will help you a lot. What it won't do is help you learn AJAX, which is what you should be doing if you are interested in advancing your skill set. What happens if you change jobs and they don't use CI? You're pooched.

1. Unless you are writing NodeJS, JavaScript is client side code. Your client and server should be independent of one another. The server responds to HTTP requests, your front end assembles the response data and presents it to the user. JS is a view item and as such should have no knowledge or access to controller/models. In true MVC that separation is important and your library skips convention for convenience. Some dev's are okay with that, some aren't (me being one of them).

2. Any code you write today should be module based and re-usable. Procedural programming is dead, OOP is here to stay. That's why you see people moving to Require/CommonJS modules. It's simply too difficult and time consuming to maintain a large project that doesn't follow standard patterns.

3. Binding client side events from a server side language is wrong on so many levels...

I don't want to sound harsh, and again this is just my opinion. You are breaking a lot of conventions that exist for good reason. You are helping people build better sites then they could otherwise, I will give you credit for that. I just wish more dev's would take the time to learn it from scratch than rely on a bridge that isn't necessary and isn't beneficial to your career in the long run.


Messages In This Thread
HMVC and Cjax - by El Forum - 01-29-2014, 04:11 AM
HMVC and Cjax - by El Forum - 01-31-2014, 05:44 AM
HMVC and Cjax - by El Forum - 02-02-2014, 06:30 AM
HMVC and Cjax - by El Forum - 02-07-2014, 06:53 AM
HMVC and Cjax - by El Forum - 02-10-2014, 08:46 AM
HMVC and Cjax - by El Forum - 02-10-2014, 09:23 AM
HMVC and Cjax - by El Forum - 02-10-2014, 09:58 AM
HMVC and Cjax - by El Forum - 02-10-2014, 11:54 AM
HMVC and Cjax - by El Forum - 02-10-2014, 12:45 PM
HMVC and Cjax - by El Forum - 06-08-2014, 01:05 PM
HMVC and Cjax - by El Forum - 06-12-2014, 09:34 AM
HMVC and Cjax - by El Forum - 06-12-2014, 04:38 PM
HMVC and Cjax - by El Forum - 06-13-2014, 05:39 AM
HMVC and Cjax - by El Forum - 06-13-2014, 01:10 PM
HMVC and Cjax - by El Forum - 06-14-2014, 02:52 PM
HMVC and Cjax - by El Forum - 10-29-2014, 12:25 AM
HMVC and Cjax - by El Forum - 10-29-2014, 02:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.