insanepenguin's Profile User Rating: -----

Reputation: 7 Worker
Group:
Active Members
Active Posts:
239 (0.17 per day)
Joined:
08-July 10
Profile Views:
2,542
Last Active:
User is offline Aug 30 2013 11:31 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
Icon   insanepenguin learning learning learning

Posts I've Made

  1. In Topic: Javascript module pattern and name spacing

    Posted 29 Aug 2013

    Quote

    When you attach an object to the window object it becomes Global in a sense, it is part of the window object which is global.


    Yes that makes sense - the context is a single page/phone application, is using the window object a way to share and initialise various modules? e.g. The app module seems to initialise the others during start up

    function init() {
            if (window.index) index.init();
            if (window.settings) settings.init();
            if (window.about) about.init();
            if (window.router) router.init();
    
    }
    


    Thanks
  2. In Topic: Javascript module pattern and name spacing

    Posted 29 Aug 2013

    Thanks guys, makes a lot more sense now - what is the main advantage of attaching modules/objects to the window object? code structure and avoiding the global scope/name collisions?
  3. In Topic: Javascript module pattern and name spacing

    Posted 29 Aug 2013

    Thanks for the reply, really helped wrap my head around it!

    So essentially the
    (window.app = window.app || {}, $); 
    
    is looking if window.app currently exists in memory and if so passes this object into the anonymous function as an argument; if the object doesn't exist yet (like on a first execution or something) window.app is set to a new object?

    And the final parameter is passing jQuery into the function for some reason?

    Thanks again!
  4. In Topic: yield return functionality

    Posted 14 Jul 2012

    thanks CodingSup3rnatur@l-360,

    That explanation helped a lot, so the yield result in GetEnumerator() is basically generating an iterator object in the background specifying to the calling code (foreach etc) how to iterate the collection<T>.
    :D
  5. In Topic: Learning to do more with a language

    Posted 14 Jul 2012

    I can vouch for the guided learning approach, I've been learning C# for a couple of years and can create my own functional/useful(debatable!) applications that connect and use databases etc - I'm by no means advanced yet and find the best way is to keep building projects where you are guided by someone far more experienced and try to understand how they are building the application and why they make the choices they make.

    I've been frustrated in the past by getting this great idea in my head and discovering I do not yet have the skill set to implement it, step by step is best!

My Information

Member Title:
D.I.C Head
Age:
30 years old
Birthday:
March 11, 1984
Gender:
Location:
Wrexham, Wales
Years Programming:
0
Programming Languages:
C#

Contact Information

E-mail:
Private
Facebook:
http://www.facebook.com/insanealcoholicpenguin
Twitter:
mikejharper

Friends

insanepenguin hasn't added any friends yet.

Comments

insanepenguin has no profile comments yet. Why not say hello?