Just some thoughts on skins complexity

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
4/22/2009 12:16:23 PM
Gravatar
Total Posts 488

Just some thoughts on skins complexity

Joe,

About 1,5 years ago I have created 2 skins for MojoPortal-based project (that is still in development), and since then I maintain them. Now I also need t create the third one. Here are just some thoughts.

1. Skins are difficult to create.

The typical situation is that I recieve html with css from the designer with the task "make the site look exactly like this".

I begin with copy of one of the existing skins. Then I mostly replace contents of layout.master with my html with inserting some portal controls into it. Unfortunately, it's not that simple (for example, trying to just insert content placeholders into html results in NullReferenceException from portal code, and inserting them with their panels results in changing their css classes from code), but accessible.

The hell begins when I try to make the designer's css work with MojoPortal. The thing is that I cannot just throw away the original skin css files and replace them with the new ones (if I do that, some portal functionality like admin pages will stop working as it uses css for positioning config pages parts). I also cannot just place them together because they usually set the same properties of the same elements, and very strange things happen. So I begin to parse the designer's css and line-by-line integrate it into the original skin css files. It's not a simple task. And if the designer changes anything, this work sometimes begins from stratch again and again.

2. Skins are difficult to maintain.

After being created, the skins must be maintained so that they work correctly in new portal versions. The only way I can do this is regular reading svn log, analyze all the changes to the skins folder and make corresponding changes to my skins. For example, in revision 5006 you fixed a bug with Opera, so I made this change to my skins as well (because I also do not want to have this bug). Sometimes new styles appear and I need to add them as well to make the portal admin pages and standard features work correctly.

If I do not do this, after a while my skins become incorrect, and so I regularly spent plenty of tyme for maintenance.

3. What can be done to simplify this?

As far as I can see, there are some ways to simplify the process.

a) Now css files are mostly devided by functionality (layout, text, color, etc). It would be nice if layout is devided by usage (core with all admin pages, master page, particular features). In this case when creating a skin one can throw away just old master page css and use the others without any change or with very little changes.

b) Some features have their own layout in css that is duplicated in each skin and differes rarely. When something changes there (something new or bug fix), any author of any custom skin must perform the same change. It would be nice to have some "default" skin-independent css that will be included automatically to each skin that does not override it (for example, by having the file with the same name). In this case it will be easier to maintain custom skins that are "nearly standard, but with a little change". Another solution can be to set one of standard skins as "base" skin and use css files from it in case they are not overrided in the "child" skin.

What do you think of this?

4/22/2009 12:42:34 PM
Gravatar
Total Posts 18439

Re: Just some thoughts on skins complexity

Hi Alexander,

Its easy to criticise from your position but I have been maintaining and supporting this project for 5 years and have poured in my soul, time, effort, and money into it. I also created and maintained most of the 30 or so included skins so I fully understand what is involved with creating skins and maintaining skins. The skinning system is pretty good in my opinion.

There is nothing stopping you from structuring the css files of your own skins differently, you just include them in the style.config file. So if you want to make some base css files that you use in most of your skins that are the same and then put the things that are different across your skins into different css files you can. You can name them what you want and list them in style.config in the order they should be added. If that makes it easier for you to maintain your skins, great.

I started a business in the fall of 2006 to try and make a living by working full time on mojoPortal. I am not yet making a living. I'm starting to make a little money from the store but I am still burning through savings and I only can make it till the end of the year so my priority is getting to enough revenue to make a living before I go broke and have to take a job.

Ideas like revamping the skinning system or little refactorings to remove similar code are just a distraction to me at this point that will only slow me down from working on more important things that can help me reach my goals. 

Hope you can understand.

Best,

Joe

4/22/2009 2:02:28 PM
Gravatar
Total Posts 488

Re: Just some thoughts on skins complexity

Joe,

I understand your position, I do not want you to rewrite the skinning system. Just wanted to discuss the ideas. If you like the ideas, I shall try to produce a non-breaking patch that will implement some new functionality (like standard feature css).

4/22/2009 2:19:50 PM
Gravatar
Total Posts 18439

Re: Just some thoughts on skins complexity

Hi Alexander,

Other than css for YUI or javascript widgets I see no reason to add css to the page other than what is included in the skin as defined in the style.config.

In my opinion its just as it should be right now and no change is needed.

Skins are self contained. It may happen that there are lots of things that are the same in different skins but it does not mean they have to be or that it should be institutionalized by separating that stuff and put it in the page some other way. You are completely free in the current model to break up the css into files named and organised as you see fit in your own skins. That is a good way to achieve to achieve your suggestion "a".

I have ideas about skins that use entirely different master pages with different code behind like for YUI layouts like this. So I want to keep skins as they are self contained with no base skins or any new complexity.

In my opinion it isn't broken and it doesn't need fixing. If you send a patch I will of course review it because I know you and know you are an excellent developer but I make no promise about accepting it as it doesn't sound like a change I'm really interested in.

Best,

Joe

4/23/2009 2:32:19 AM
Gravatar
Total Posts 488

Re: Just some thoughts on skins complexity

Ok.

You must sign in to post in the forums. This thread is closed to new posts.