- Hi! What are you doing?
- Nothing!
- That’s what you did yesterday!!
- Well I haven’t finished!!
- Hi! What are you doing?
- Nothing!
- That’s what you did yesterday!!
- Well I haven’t finished!!
I have read many things about frameworks! Some good, some not so good. I know there are a lot of developers there who are using frameworks for whatever they need.
I am a php developer so I am going to talk mostly about php frameworks even though I think I can easily write code in whatever language I am supposed to do it.
Frameworks are good, they help you alot, they have all these well written classes with all those methods that you can simply use and know they are working. Almost all of them implement desing patterns and do it well. So.. if they are so great why use something else?
First of all.. these frameworks are open source, meaning that everyone with some skills can reveal weekness of the code and exploit it. Prove it! Some might say… I don’t have to! This very wordpress platform has some of those (some were fixed … some were not… I did not upgrade to the latest and I am not interested in doing it). I am talking not only about security bugs (escaping everything, using proper permission levels, not allowing everything, thinking about the user as a complete moron is protection enough… that will not help you against server attacks.. that is something your hosting company should worry about… don’t use full user rights on the db though for everything and do not keep very important stuff on some sort of third party server) but also about performance issues.
I had a recent conversation with a friend of mine about php frameworks, platforms etc. The discussion we had was mostly about a reliable platform to use for an online store. Inevitably magento came into discussion. Now… that code is gorgeous… it is a beauty… a mvc with design patterns implemented all over it.. it is a pleasure to read that code… to see what some very good developers can do. The only thing about it is that the good things about it stop here. Even though the administration console is very nice (idiot proof I might say)… the application is so so so slow. You need some real hardware to support it… a couple of servers using load balancing, some others for the database (for replication and stuff) .. and this is only to be sure that your application is running inside decent parameters.
Why? It’s code is almost perfect, it implements so many design patterns which proved to be very very good and usefull.. why is it not working right?
Simple! It uses too much of that! The code is so carrefully written that it ignores every performance principle for the simple … beauty of the code. Indeed gentlemen.. no one will be able to say that the code you wrote is shitty. But you might want to take into account that you should look at the entire picture when you write something. Don’t just do you best about implementing your little, small task … think about how the performance will be affected about what you write. Because, if in desktop applications you can simply blame the client’s computer … in web apps you have no excuse.
A conclusion?!
Use frameworks! But do not let them take over. Do not use them for everything! Use a shitty mvc implementation (design time if you do not have the time to build a run time one) but keep it simple! Load what you need when you need it. Do not instantiate classes if you are not willing to use the objectst, keep your code simple, smart and to the point.
All of use developed reusable code but do not try to think at a specific application in general terms. Think at a specific application as a complete new application you must build and, eventually, how will you be able to integrate what you already have inside it. Write code as abstract as you can, manage your dependencies, separate concerns and you will not have difficulties about reusing it.
I am sure that almost all of you had a hard time about integrating cross-browser transparency and had to deal with the internet explorer v.6 browser. Although transparency is supported by all modern browsers it is still not supported in IE6. That is alright some of you might say, IE6 is about to leave the market and we can all use png transparent files freely. That is not exactly so because even after IE7 is here and IE8 is about to come out, over 30% of the internet users are still using IE6.
Why? I don’t know! Maybe they are using a system that is working and they are not willing to leave it. Maybe they like it, maybe they don’t know any better… I don’t know and, to be honest about it, I don’t care.
There is a way to build transparent background in IE6 using tranparent PNG files and that is all I am interested about
. How? By using the DXImageTransform filter. You have some of the code needed below.
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src=”someImageSource.png”,sizingMethod=”crop”);
If you are interested in finding out more about this I think you might want to use this link as a reference.
Have fun.
I just “migrated” my zetea.eu email on gmail. I followed the model already checked and verified implemented at IT Exchange so the functionality and the accuracy of the spam filter for instance were not much of a surprise for me.
What I haven’t tried before was the administrator console that Google gives for this apps integration. That is very cool. You can control pretty much everything: email addresses, users, internal chat, calendar, docs, sites. So… from what I am concerned: it is super cool being able to centralize all these in one application.
Pros: space, 6+ gb email storage per account, joint calendar, “internal” chat, shared docs, super spam filter… and it is all for free. The other thing that I took to account was the privacy.
All of us have our sites hosted somewhere… most of us pretty much know that every email is stored on the server so the hosting company at least has access to all our email. This does not change much by using Gmail.. but.. at the size Google is, at the number of accounts it manages.. it would be more than costly for them to check every email that comes trough this system.
Of course… some will say that it is not such a big deal to set up a program that will filter “sensitive” issues. Yes! I agree! But at the level that the most of us do business, the information is more than irrelevant for a company such as Google, but for the little to medium hosting company might mean a business opportunity.
Hail Google for all the free space and software you provide. Even though all this info will .. if not already is used against the user (adsense, adwords… etc).
So… what apps do you use? Not necessarily from Google.
The first question is: can we approach CSS from an object oriented point of view? Some would say no… I’d say yes and I will try to demonstrate why.
There are at least 3 OOP properties that can be successfully used in css design: the polymorphic behavior, inheritance and extension. How does this work?
What we first need is a core, a file that will handle all generic properties of the future html elements. Of course, this concept is mainly based on the class concept in css, id’s will be used only for main containers who’s properties remain the same all along the way. For the rest of the elements we will use the class selector. This file must always be included first in the head of the html file.
Now, that we have the core (I am assuming that the site has multiple page styles on the same skeleton), we will apply 2 of the above mentioned OOP properties: inheritance and extension. For the elements that have unchanged position and size for instance, we will use the core class… of course, on a certain page type, the same element will have different properties: other font styles, other background image… etc. What will we do? Replace the class? Of course not! Why define another class… with the exact same base properties when we can inherit all those properties and simply “decorate” the element by adding another class to it. This way the old/core base properties are kept (inherited) and new ones are added (the element is extended).
Does the above ring a bell? Does it sound like a design pattern to anyone? A decorator maybe? Of course, we must keep the proportions … this does not make css styling a progrtamming language… it is nothing but an approach to css design.
There is one thing I left out: the polymorphic behavior. This means you can call the same class withing different context and it will do what is supposed to do. This first “item” that comes to my mind is the “selected” class. Let’s suppose we have at least 2 sets of navigation blocks (that is kind of common) and we want to mark the current page by highlighting the corresponding item in the menu. In both blocks we have the “selected” item, in both cases it does the same thing, highlighting the current page but, because of design specifications, the styles are different. Should we use different classes? No. We simply bound the class to the “parent” item and apply the styles we need.
Another example for the polymorphic behavior is a class named box. Obviously it defines a box but in our case it defines all the boxes across the site. Every time we need a box … we will call this class and decorate it to fit our needs. I need to make 2 remarks here:
1 - it will not work in IE6 because IE6 is nothing but a dumb fuck that exists for the sole purpose of making a developers life harder.
2 - it integrates perfectly with smarty objects. Meaning that in a system of templates, if you have a template called “box.tpl” you will be able to easily include that template anywhere you like without modifying the code, only by passing the needed decorator parameters to the “include file” syntax. Imagine the power and flexibility of these two combined.
In the end I will try to answer the following question: Why should I bother designing such a system? Why should I waste time on it?
The answer is not “because it is so nice” nor “because it is how you are supposed to do stuff” .. it has a more pragmatical approach: Because you will be able to reuse that code! Because it will save you time and nerves! Because what you now have is a powerful and flexible framework.
Yes! Today I had my final exam at the Technical University in Cluj Napoca. I officially have a master’s degree in Computer Science and Programming, 10 as degree (A+).
So.. what is next? I want to get my Zend certification this month, I hope I will have time for that, took some vulcan tests and I seem to be oki doki. I will not get my masters degree in Classic Studies this year
… but I hope that until this year is over I will be a senior software engineer at IT Exchange
Oh… and yesterday was my birthday (25)… virtual beer for everyone.. if you do not know how that is like… just leave a comment with your email and I will send it over. ![]()
There are some stuff I want to do this year. I am not sure I will be able to do all of that but…
1. Get my masters degree in classic studies
2. Get the php Zend certification
3. Get my masters degree in computer science and programming
4. Become a senior software developer at the company I am working for now.
5. Spend more time with my family. [this is going to be real though]
These are my plans for this year. Not much… but not easy to achieve.
Hi, Yes, it’s been a while!
I am finally on vacation, until January 7th, 2008 so I am happy, I’m in the mood for jokes.. fun stuff and Christmas. But some jokes until then:
1. Why only 10% of our brain is executable? Because the rest consists of comments.
2. How many buttons has a Microsoft keyboard? 3 (ctrl + alt + delete).
3. Ladies and gentlemen you are on board of the newest airplane, fully computerized, with the perfect auto pilot that will never fail, fail, fail, fail, fail, fail…
4. A programmers wife at the store: Excuse me please… do you happen to have some perfume that smells like a computer?
A few days ago we launched a brand new section on our site dedicated to our SEO Tools.
For the time being we have about 20 tools but we promise to grow on that and offer as many tools as we will find suitable to help you.
Of course you can place them on you own site too… the code that needs to be added is available with each tool.
Have fun.
No.. that’ s no mistake! That’s how our company is called. Web steroids… according to Fungift. I must say that all the work was done by Ciprian but… as I work there… I also feel as a Web Steroid
PS. I can’t say I’m nothing but Mexican crap ;)).