Added: 2 years ago
From: bidwx
Views: 12,400
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • I am kinda new in the .net scene and ill be watching more but whatsup with the cursor it looks mad.

  • You say not to put business logic in your page itself, but then you contradict it by creating an instance of a class within your button's click event, instead of creating the instance as a property of the form or making this method static, which is also more business logic then the creation of a string, which in my opinion, is part of the designers work who you would now have to share your Greeter Class in order to be able to change that.

    These tricks should only be done in big programs.

  • I realize this is an old thread but I found this to be quite useful -- thanks, bidwx. To answer exlova's question, it's bad form to embed business logic such as "Hello world" in the codebehind. Typically, if a future developer wanted to change this greeting, the appropriate place to look would be in the construct behind the button's instance, which is what he is demonstrating here.

  • Where do I download this software please?

  • Why do you want to avoid business logic?

  • Hi - In order to improve the ability to maintain, change, and extend the code, business logic should not be combined with the user interface code. Check out our videos on UML for a discussion on how to break an application into classes.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more