Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Apr 2010
    Posts
    220
    Thanks
    116
    Thanked 1 Time in 1 Post

    Creating a customizable 'start' page

    What platform or direction would you web developers suggest if somebody wants to create a 'customizable' start page for their company website (think iGoogle, etc).

    In other words, a company wants their business website to be customizable for anybody viewing their site (think netvibes)

    The idea is to create a basic start page, news, weather, etc, but based around a static, central theme.

    Any advice or suggestions on where to start? WordPress?
    Last edited by BlackReef; 01-25-2013 at 09:49 PM.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by BlackReef View Post
    What platform or direction would you web developers suggest if somebody wants to create a 'customizable' start page for their company website (think iGoogle, etc).

    In other words, a company wants their business website to be customizable for anybody viewing their site (think netvibes)

    The idea is to create a basic start page, news, weather, etc, but based around a static, central theme.

    Any advice or suggestions on where to start? WordPress?
    You would need a server side solution to do that. It can't be done using only JavaScript. You will probably get a better response if you asked in a forum about web site design or server side scripting rather than a JavaScript forum.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,632 Times in 4,594 Posts
    I think I mildly disagree,with Felgall.

    I think it would be better to at least support it with server-side code (and, just for example, ASP.NET has builtin support for this).

    But I can't see why you couldn't do it with JavaScript, *provided* that all of the building blocks (the "widgets" if you will) are always present on the page, so that all JS has to do is position them (including possibly hiding some) and/or change some styles. You could then remember the user's choices in a cookies, for example.

    I don't think this is the best solution. But at least to a limited degree it could be done.

    The main "cost" is that *ALL* the available elements have to be sent to the browser, even if a give user doesn't want some or all of them.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,460
    Thanks
    11
    Thanked 600 Times in 580 Posts
    if anybody means a person, you need a server.
    if anybody means a browser, js alone is more than up to the task.

    you simply memorize the layout options using localStorage, and apply those when the page loads. You can also use location.hash to store the options, and in that case, adding a bookmark would save the layout. the hash approach has the advantage of being linkable and thus share-able, back-forward-able, easily backup-able.

    if you wan't bob to have the same menu at home as at work, he can either email himself the hash link, or sign-in to your server to retrieve a stored layout. either way, he's going to have to enter some info at each device.

    the JS approach is safe and simple, while any server accounts need extra care to be secure from hackers whilst allowing password resets.

    i disagree with Old Pedant; you can fetch the building blocks using ajax or script tags if loading all the options by default is too much for a single page.

    you might want to make sure a basic copy runs ok without any scripts, forgoing the customization.

    where to start?
    i would look into jQuery and it's UI options. there are many content container toggler scripts. even tabs and accordions are a simple boon to custom layouts. most can memorize the options between visits automatically. many support ajax for loading specific chunks of content from other URLs.

    once you have a basic layout customizer, then worry about sharing and saving it, we can help you better with specific code.
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,632 Times in 4,594 Posts
    i disagree with Old Pedant; you can fetch the building blocks using ajax or script tags if loading all the options by default is too much for a single page.
    DOH on me. I was actually thinking of when you *first* present the page. How does the user know what elements are available unless they are already there? But of course the obvious answer to that is to add a pop-on which has clickable icons. You click an icon to load that element to the page (or, I suppose, bring up the pop-on again and click the icon again to remove it) and then it's easy to drag and drop it as needed.

    Okay, so yeah, what's wrong with this approach?

    I'm not sure about the hash tag idea; depending on how many options you allow, you might end up with a hash tag as long as your arm. But it could certainly work for many cases. Hmmm...maybe the hash tag is actually just a "key" into a server-side database and the first thing the page does is use the hash tag to hit some AJAX code and...

    Well, almost too many possibilities.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,302
    Thanks
    203
    Thanked 2,562 Times in 2,540 Posts
    Is this not a case where the usual warning about users disabling Javascript does have some force?

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,918
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    Quote Originally Posted by Philip M View Post
    Is this not a case where the usual warning about users disabling Javascript does have some force?
    It is, indeed. And it is also indeed possible to create a customizable start page without needing JavaScript. It may not be as dynamic (interaction wise) but if it’s for a general public and you’re serious about your craft there’s no reason why you couldn’t create a website that works both, with and without JS.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •