开发者

Componentization of Master Pages and such for resuability

开发者 https://www.devze.com 2023-03-12 09:21 出处:网络
I am fairly new with to the web world, so bear with me. Say I have a handful of web apps that my company and several of my sister companies will use.There will be plenty of new web apps in the near f

I am fairly new with to the web world, so bear with me.

Say I have a handful of web apps that my company and several of my sister companies will use. There will be plenty of new web apps in the near future as well. Most of these apps will span across multiple servers and even domains; some might be intranet, some might be corp-to-crop. Regardless, we want all apps to share the same look & feel; As it is now, we basically copy & paste an existing开发者_JAVA技巧 project and work from there. It feels sloppy and I'd think there has to be a better way. I tried researching before posting but I came up short.

My initial thoughts (again, I'm new to web so don't laugh too much) were to create a library that would contain some master pages (for standard ASP.net apps & for MVC apps), style sheets, and images. Then provide values for "Company Name" & "App Name" in the web.config files. Unfortunately, Googling this idea brought up some results that indicated this would be sloppy.

I'd love to hear how the more experienced developers would take this one.


For ASP.NET Web Forms applications you might want to look into theming. Theming allows you to use a single set of master pages/content pages, but identify dynamically the theme that will be applied to the application. It's a pretty powerful feature that I haven't seen used very often. But when used correctly it looks like it might fit your needs.

MVC on the other hand, doesn't implement theming the way Web Forms does. Or at least it doesn't to my knowledge. Someone else might want to jump in on that one.


Although I'm not an experienced developer i've always just used a common style sheet across different applications. This, along with a list of elements that need to be included in each page has served me well in the past.

0

精彩评论

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