I went so far as to buy a book on Rails and decided--admittedly far too early--that I didn't like the look of it. Determining code blocks and scope via ident seems like a bad idea to me. I've never managed to understand what advantage it ostensibly brings. I've never seen it expressed in some meaningfuly way. People always say things like "they're teaching it at universities" or "all the startups demand it." Enthusiasm (as charted by Google Trends anyway) seems to have peaked around 2007 and declined since. That said, it's far more popular than either CodeIgniter or Laravel. Laravel seems to be spanking CodeIgniter's popularity too. I have no idea why. I justify my suspicion of these new languages by telling myself they have features for coders who need things simplified and who don't know (and don't want to know) about how things really work and how to configure their web servers. My inner curmudgeon fears the possibility that they do actually result in faster ("more agile"...gag) development. In reality, I don't know the difference and hate the idea of spending lots of time learning all these different languages and frameworks enough to decide for myself.
Derokorian;11044267 wrote:I have a script in my framework to deploy, it just requires config for the server be set up. The config is stored in the customer's repository, and the script pushes based on git hashes, so I can also push any commit to the server. This allows for easy roll-back as well if I mess something up (not that I would ever do that!). I also have written my framework in such a way that I can ssh into the server and update the db from structure defined in the project (namely, I do cli.php upgrade
or cli.php install
). I would say most of my project time is spent adjusting the angular models and changing views to match design, and very little on server config. I run a custom rpm to install all the necessary programs; such as php, mysql, apache and their dependencies, though not in that order.
I really like the idea of this homespun configuration tool, but I think most of my respect derives from the fact that you built it yourself. I've started to move toward configuration tools and such. In particular, I created a 'template server' -- an Amazon EC2 instance that has a LAMP stack and a lot of mail- and security-related configurations. Starting a new website usually just involves building a new server from an Amazon AMI. I still have to configure database credentials, a domain, email, etc. by directly editing config files. I'm still trying to sort how I can set up a website to easily support production, development, and individual workstation configurations while storing code in a single git repo without people being privy to others' credentials and without having to create some elaborate .gitignore file.
In practice, I do not build a lot of new websites. I tend rather to maintain a few websites with large number of users and/or extraordinary functional requirements (like an asset pipeline that processes millions of images per day). The serving of web pages is the primary consideration, but the integration of unusual processes or meeting unusual performance requirements is what makes them unsuitable for an out-of-the-box configuration model -- at least in my opinion.
Derokorian;11044267 wrote:As I've eluded to earlier, I use angularjs for developing client side now. In addition, I use requirejs for managing dependencies and keeping files specific to their function. An example of my folder structure:
+ root
| - app.js
| - home.html
| + user
| - controller.js
| - model.js
| - login.html
| - logged-in.html
| + blog
| - controller.js
| - model.js
| - directives.js
| - view-post.html
| - view-comment.html
| - add-post.html
| - add-comment.html
I need to ramp up my AngularJS understanding immediately. Any materials to steer me toward the AngularJS awakening would be much appreciated. My first question is what is so @!@#$ great about AngularJS?. I.e., why use it? Does it mean I have structure my site as a Single-Page Application (SPA) ?
Also, managing dependencies in JS seems like a total nightmare. A series of include/require statements in PHP is nightmare enough and can be solved with some kind of autoloader, but in JS you are potentially dealing with sequencing subsequent asynchronous http requests. I shudder at the thought.
Derokorian;11044267 wrote:
They just seemed so heavy and I feel like my sites perform better not using them. True, I could get something going - but debugging and looking at the call stack was a bit ridiculous. I also realize now, that I tried most of the FW I've worked with years ago, so things may be different.
Some frameworks definitely seem sluggish. All the hooks and routing features and application of regex pattern matching for urls and checking the file system for corresponding files and various other actions that are repeated every time seem so over-the-top sometimes. CodeIgniter seems pretty light to me and understanding it's url-to-controller routing scheme is pretty intuitive, but I wonder sometimes about its performance and security compared to other schemes. That said, I do like the way it facilitates sane code organization and rapid development. The compilation of code into some kind of DLL or JAR file seems positively medieval.