Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 27th, 2003, 12:18 AM
Registered User
 
Join Date: Aug 2003
Location: , , India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DESIGN Patterns

hi ,

i m trying to get information on Design Patterns for VB.net . Can someone plz help.

thnx,
  #2 (permalink)  
Old August 30th, 2003, 02:53 PM
Authorized User
 
Join Date: Aug 2003
Location: Brisbane, Queensland, Australia.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yo! What do you mean by Design Pattern, please? Is it a general stategy for planning a project?
Yassu!


  #3 (permalink)  
Old August 31st, 2003, 01:46 PM
Authorized User
 
Join Date: Jun 2003
Location: Cowes, IOW, United Kingdom.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JonathanC
Default

I will try to give a very generalized view of what a Pattern is. This is because it can be interpreted by different people from different backgrounds in different ways. So here is an overly simplified version, with as little terminology as I can :)

Since programming activities have existed for a long, long time and certain problems have arisen over and over again, patterns address some of these problems by offering a solution. The solution can sometimes be standardized and documented. Design Patterns are a result of people learning ways of doing things and constructing guidelines for doing it. They are not fool-proof, nor are they appropriate for every occasion, but they do offer benefit where they fit the problem.
It is not fixed thing - more patterns are being created all the time.
You can create patterns too!

Let's create our own somewhat silly design pattern here quickly (so that you get the idea) -
Lets call it ExternalAccess.
Reason for pattern: To make sure that whenever a propery is used it uses the rules for the property.
Example (our set always adds a 1)
Property myValue as Integer
    Get
        Return internalFieldValue
    end get
    Set
        internalFieldValue = Value +1
    end set
end property

if our code inside the class talks directly to internalFieldValue it will not run the code thus not adding the 1.
This is a problem.

the rules for negating this problem:
- The object must have Property Accessors (Gets/Sets)
- All fields must be private to the class.
- when internal code (code within a member of the same class) uses the property it must use the property and not the field.

So in this simple example, all we have really done is provided some guidelines, but in a more complex pattern we may also have declared what kinds of objects to create and how to use them.

So, Design Patterns are kind of like a cross between templates and coding guidelines for constructing code.

Recognized Patterns are those that have been accepted by the general community of architects and developers to be useful. These include patterns like Abstract Factory and Facade.

Most of the time, Patterns are relatively language independant, so you can use the same pattern in different languages. Some patterns though have specific ideas about the language. When it comes to .NET, C# and VB.NET patterns will be absolutely the same except for syntax. This is because it has the same ideas about types, classes and the language syntax is for the most part nearly a 1 on 1 mapping. So if you find a pattern implemented in c# (provided you can read c#) would also be helpful to you.

Here are a few c# and vb.net links (the c# may be easy enough to get you started even though you are coding in VB.NET).

http://www.vbdotnetheaven.com/Code/Jun2003/2015.asphttp://msdn.microsoft.com/msdnmag/is...1/07/patterns/
http://www.codeproject.com/csharp/csdespat_1.asp
http://www.dotnetextreme.com/code/SingletonCs.asp


I do not know of any specific VB.NET centric views on Patterns - perhaps some other reader could contribute some links?




Jonathan Crossland
http://www.jonathancrossland.com
  #4 (permalink)  
Old August 31st, 2003, 02:02 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Microsoft has released a rather hefty but pretty interesting white paper about patterns in .NET applications called Enterprise Solution Patterns Using Microsoft .NET. Code examples are in C#, but since there isn't much code in the book, that shouldn't be a problem. The book focuses on the patterns more than on the implementation, but they *do* provide basic example to illustrate their point.

The book deals with patterns for multiple kinds of applications; ASP.NET, distributed applications, etc.

You can download the white paper from the Patterns section of the MSDN site at http://msdn.microsoft.com/practices/...se/default.asp


Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design Patterns planoie General .NET 5 February 21st, 2007 01:56 PM
Design patterns for web design ceadge HTML Code Clinic 0 June 19th, 2006 11:26 AM
Professional Design patterns in c# preticul Wrox Book Feedback 0 February 7th, 2005 06:36 PM
Java Design issue with UML and Design Patterns the_logical_way Apache Tomcat 0 May 31st, 2004 04:02 AM
Design Patterns Indian Ocean J2EE 0 September 25th, 2003 03:18 PM



All times are GMT -4. The time now is 08:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.