Throughout my career as a web developer, I’ve come to realise that building a website is a lot like cooking. Everything needs to be just right, and that there is a certain balance that needs to be kept. Get it right, and you’ll be serving a Gordon Ramsay dinner - rich, elegant and enjoyed by all. Get it wrong, and you’ll be serving a fast food dinner - greasy, bloated and no good to anyone.
It’s important to think about what you actually need as it’s very easy to get lost and end up with a website that actually have more features than you actually need.
I have compiled a list of guidelines that I personally use when starting a new project.
Geta has released yet another open source EPiServer CMS module. This latest module allows EPiServer administrators, as well as anyone with access rights, to manage the cache for EPiServer sites.
- One-click cache clear- Clear EPiServer site cache with just one click.
- Selective cache entry deletion - Select and delete individual cache entries.
- Cache entry value display - View the contents of cache entries.
- Multiple server support - Manage cache for multiple servers from a single node.
I’m currently working on a small NuGet module for EPiServer CMS, and I thought it’d be cool to implement a RESTful API using the ASP.NET Web API. However, as you probably already know, you need to make certain adjustments to the Global.asax file to set up some routing so that any requests made is redirected to the appropriate controllers.
This is fine if you’re implementing Web API into your main project, but not if you’re trying to get it working in a 3rd party module. You really don’t want anyone who installs your module to have to unnecessarily edit anything on their end. It’s just bad design.
Every now and again I get into this situation where I have a list, and some JS function will retrieve more stuff via Ajax to insert into that list. This is normally fine if you stick to normal lists, but once you start using DIVs (eg. grid) and whatnot things start to get a bit more complicated. For one, you will have to make sure the item you’re appending to the list uses the same template as the existing items, for consistency.
So the question I normally get asked is, “What’s the best way to display the new list items in this kind of situation?”.
There are a couple of ways to do this, and in most cases they all output the same stuff. The only difference is the speed in which the job gets done.
However, working with ASP.NET, there are times when appending your JS files to the bottom of the page is not an option, especially so when you work with partial views in which your JS functions accepts parameters generated by the application. For example, you have a partial view that accepts some parameters from some other view which is then used in one of your JS functions. But you want to include the jQuery library at the bottom of the page to reduce your initial loading time. However, the function you’ve included in your partial view relies on jQuery being defined before the partial view. So now the script fails because $ or jQuery is undefined when the browser hits it.