开发者

XSLT vs MVC vs CSS for flexible mobile/normal layouts

开发者 https://www.devze.com 2022-12-20 22:17 出处:网络
I\'m building a new front end for an existing forum project, and I\'m undecided on the best route to take for the user front end.The project will be built in ASP.Net 3.5.

I'm building a new front end for an existing forum project, and I'm undecided on the best route to take for the user front end. The project will be built in ASP.Net 3.5.

The requirem开发者_StackOverflow中文版ents are as follows: 1) User selectable themes/templates must be supported - I have forum goers who will want to contribute forum themes, so the layout system must be flexible.

2) Mobile friendly. The site must be usable from the most popular mobile browsers, so I have to be able to substitute templates based on the user agent and/or site url.

As near as I can tell, these are my best options:

1) XSLT: Output all of the relevant data in XML format, and dynamically attach an XSL stylesheet based on user settings/mobile state. I'm unsure how well mobile browsers support XSLT, but it appears that at least some do.

2) MVC: Sub in a different view based on user settings/mobile state. This might be harder to support templates from users, however.

3) Pure CSS: Standard DIV+CSS style layouts, subbing the CSS stylesheet in based on user settings/mobile state.

I'm quite sure that all of these options will work, however, I have only a basic familiarity with MVC, having developed exclusively in WebForms until now.

I'd love some guidance here, before I end up down the wrong path.


I would go for pure CSS layouts. It is increasingly being supported by more and more browsers.

I can't comment on MVC - no experience with that.

XSLT is something I like a lot. I don't know about mobile browsers, but it certainly is well supported by major desktop browsers (by supported I mean XSLT 1.0 is well supported). The downer is that there seem to be relatively few people with skills - much less so than CSS. So if your goal is to get reasonable abount of user contributed themes, I think that would be much better achieved with CSS.

0

精彩评论

暂无评论...
验证码 换一张
取 消