Posts tagged ‘framework’

Building the best application…

Most of the beginners and, sometimes, even more advanced programmers, want to develop everything from scratch because they want have control over the every aspect of their application. I entirely understand this tendency. When you learned how to program and you can code nearly anything you want (this relates more closely to scripting languages like php, perl, js etc), you start to do something global. Something that will change the world. This may be a new CMS, a new framework, new blog of e-commerce engine. And when you start this, you want to code it in the most efficient way, optimizing every little thing: every function, every SQL query. At the same time, you want to reuse the code you’re writing. So you tend to create more general solutions than you really need. And this slows down the performance. And again you go into optimization, limiting the possible uses to some extent.
Finally, if you finish your application, it may be faster or better than similar ones (however, usually it is the same or worse), but remember how much time you spent developing it. Yes, you’re proud of yourself – you’ve created your own DB abstraction layer, that handles SQL injections in a very smart way. You’ve also developed your own ORM engine, that goes nicely with your DB abstraction layer. It is quite likely, that you’ve already created your very own template engine and a nice JS library that makes animation very easy. Great job, my fellow programmer!
Continue reading ‘What is a framework and why you should use one?’ »

Intro

OOP is a great concept, it simplifies the programmer’s life, especially in the field of interface development. Nearly all modern web-interfaces use JS in some way – for field highlighting, validation, help etc. It’s OK when there are such simple things.
And now imagine, that we have a set of dialogue windows (HTML+CSS) for adding a comment, rating, sending to the friend. Each of these boxes has a number of functions – check if user is logged in(if not – show login form), send AJAX request, process response, show error/success messages, position the box on the page etc.

Continue reading ‘OOP in jQuery’ »

The problem

Nearly every large application has some configuration parameters – site admin email, cache time for different blocks, number of latest news, number of items per search or catalogue page etc.

Continue reading ‘Handling Application Parameters in Yii – Using the Database’ »

The problem…

In Yii you can have all your JS and CSS files together with your PHP. For example, you have some view in /views/user/create.php and you can have your css & js in /views/user/assets/css/ and /views/user/assets/js/. That’s quite convenient when you reuse your views/controllers/components from application to application. But these directories are not accessible from the web, so there is publishing mechanism there. Continue reading ‘Registering group of JS files in Yii’ »

Long journey to the framework…

I’m developing web-applications since 2004, I am crazy about nice architecture and first-class CSS+JS frontend. On the server side, I was using my framework, quite basic one. And all my projects were based on it.

In the October 2008 I finished one of my projects using my own framework. Then looked at it critically, then saw description of the Zend Framework (it had so many features, that mine didn’t!), and decided to move from my own development to the better product.

Continue reading ‘Yii – the framework of my choice’ »

Yii is a great framework. It gives excellent built-in functionality, but, from my experience, is quite sensitive to the server configuration. Mostly because it relies on the newest technologies.

So here is a list of things to check when you experience strange things Continue reading ‘Yii framework – tips when going production’ »