The Active Network
ActiveMac Anonymous | Create a User | Reviews | News | Forums | Advertise  
 

  *  

  .NET Pet Shop
Time: 00:11 EST/05:11 GMT | News Source: ActiveWin.com | Posted By: Robert Stein

Pet Shop 2.0 Sample Application is a blueprint for building scalable and reliable enterprise Web applications using the Microsoft .NET Framework and ASP.NET.

Write Comment
Return to News

  Displaying 1 through 25 of 161
Last | Next
  The time now is 11:45:55 AM ET.
Any comment problems? E-mail us
#1 By 1845 (12.254.162.111) at 11/6/2002 4:28:18 AM
It bugs me to read code when the { is not on its own line.

private void vDoSomething()
{
//stuff
}

is my preferred style.

#2 By 1845 (12.254.162.111) at 11/6/2002 8:56:47 AM
I must not have installed the parser for nomdlevease, because I didn't catch that at all.

#3 By 1845 (12.254.162.111) at 11/6/2002 10:39:05 AM
This is an article about the source code to the Pet Shop app. In the Pet Shop app to reduce the number of lines of code all of the "{" of functions, classes, etc. are on the same line as the declaration rather than on their own line. My comment was rather applicable to the link. I suppose this isn't exactly an article, it's a link to the download site for the Pet Shop source code, but whatever. At any rate, a comment about the Pet Shop code is severely on topic.

I'm not saying that I don't make OT posts. This, though, wasn't one of them.

As for nom calling anyone a troll, though, that's just laughable.

#4 By 1845 (12.254.162.111) at 11/6/2002 12:50:01 PM
Thanks for the support steven and z00k.

Ditto that about {}'s , z00k. I even include {} for one line code blocks after for, foreach, if, and else if, for readably's sake.

Some other things I noticed about Pet Shop code:

public string InStock {
get { return inStock; }
}

Most folks would write this as

public string InStock
{
get
{
return inStock;
}
}

or at the very least

public string InStock {
get{
return inStock;
}
}

I also like the use of ? : to reduce number of lines.

#5 By 2459 (24.233.39.98) at 11/6/2002 2:11:32 PM
True, but even with the extra space from formatting the code differently, I still don't think it would add much when you consider the 2,096 LOC for .NET vs. 14,000+ for Java.

#6 By 1845 (12.254.162.111) at 11/6/2002 2:31:27 PM
gt, I have vs set to format the way I like it, so all is correct by putting the final } on a namespace. ;-) I know they formatted the code to reduce the number of lines. I haven't checked Sun's Java source, but I'll bet they did the same thing, so I imagine it pretty well evens out. In other words, I agree with n4cer.

Drax, I'm with you on using vs. I'm a huge fan! I guess most of my gets and sets usually have more than one line, so wouldn't think to scrunch the {} around the code. Even in the few cases when I only have one line, I'd do the {} on separate lines for sake of code consistancy. To each his own, though.

#7 By 1845 (12.254.162.111) at 11/6/2002 3:20:29 PM
Yeah! We agree that .NET is rad and on a coding style!

#8 By 1845 (12.254.162.111) at 11/6/2002 4:17:21 PM
The only thing I don't like about .NET is the naming convention guideline. I'm a fan of prefix notation for variables and methods. I'm consistent. All my code whether in C++, VB6, VBScript, JavaScript, or C# uses it. I see no reason at all to switch code standard just because I've switched languages.

#9 By 20 (24.243.41.64) at 11/6/2002 6:42:49 PM
Just so ya'll know:

This style:
public void foo() {
string blah = "blah";
}

is called "K & R braces" after Brian Kernighan and Dennis Ritchie, the authors and creators of C and the book "The C Programming Language".

This style:
public void foo()
{
string blah = "blah";
}

is called "Pascal braces" after the format used in the Pascal programming language.

As a side note, when I was looking the name of Brian Kernighan (I can never remember his name), I found this interview with Ken Thompson (co-creator of what would later be called Unix at Bell Labs):

http://computer.org/computer/thompson.htm

which contains the interesting quote:

Ken Thompson: I view Linux as something that's not Microsoft—a backlash against Microsoft, no more and no less. I don't think it will be very successful in the long run. I've looked at the source and there are pieces that are good and pieces that are not. A whole bunch of random people have contributed to this source, and the quality varies drastically.

My experience and some of my friends' experience is that Linux is quite unreliable. Microsoft is really unreliable but Linux is worse. In a non-PC environment, it just won't hold up. If you're using it on a single box, that's one thing. But if you want to use Linux in firewalls, gateways, embedded systems, and so on, it has a long way to go.


I wonder if he would revise his "Microsoft is really unreliable" statement today. I find many Unixy or Linuxy MS-bashers have never even used NT or 2000. They see Win9x/98/ME and, rightfully say, Windows sucks, but they don't realize they're using old software that's "legacy-ware".

Anyhow...
-d

#10 By 20 (24.243.41.64) at 11/6/2002 6:49:07 PM
Sorry, one more quote:
"I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act."

Ken Pier, Xerox PARC


#11 By 20 (24.243.41.64) at 11/6/2002 6:52:06 PM
Bob: Hungarian Notation is inherently evil. It's great the first time you use, but even during refactoring, the coder himself can screw up the type such that strFoo is actually int.

Please refer to the "How to Write Unmaintainable Code" guide which has a whole section dedicated to Hungarian Notation.

http://www.mindprod.com/unmain.html

And specifically:
http://www.mindprod.com/unmainnaming.html #29 and #30

Hungarian Notation is the tactical nuclear weapon of source code obfuscation techniques; use it! Due to the sheer volume of source code contaminated by this idiom nothing can kill a maintenance engineer faster than a well planned Hungarian Notation attack.

#12 By 20 (24.243.41.64) at 11/6/2002 6:55:09 PM
#18: Many people don't use that. Plus, that's not a "Java thing", that style goes back to C as I mentioned above.

Thank K & R for that blight on programmers around the world (well, in addition to C :) )

#13 By 20 (24.243.41.64) at 11/6/2002 10:44:55 PM
#23: Re: IIS, MSI, Perl, etc

Well, it is an ASP.NET web app, what else do you expect it to be dependent on? It's an ASP.NET web application meant to be run in IIS, which is why it has that dependency.

If you just want to browse the source, I think there's a way to do that, otherwise I can zip it up and send the source part to you.

Re: Perl obfuscation
Oh man, have you seen any of the contests? My favorites are the ones where they make a design with the source code.

Re: Ken Thompson. Fair enough, good point. Linux is markedly better now, but still not as good as Windows ;)

#14 By 5444 (208.180.130.104) at 11/6/2002 11:35:19 PM
Hmm,
don't want to date myself to much here.

But I learned C from the original K&R book,
Hungarian Notation wasn't even a concept from them.
(you don't see to much of it in Unix code for example)
(at least Not early Unix code, haven't played much with
current code in a long time)

Hungarian Notation was just starting to take off when I was getting ready to graduate High School in 1986 and was tied to an OS that we all know and love, DOS. Although you could find it in some other places. It carried over into the windows platforms.

El .


#15 By 1845 (12.254.162.111) at 11/7/2002 2:40:49 AM
I've listened to the arguments and read the links, but I still disagree.

JWM
Determine the type - while it is true that with an IDE like VS.NET I can easily determine the type, I can more easily determine the type by looking at the prefix.

OO principles - for the most part, I use prefixing for value types. While it is true that value types can be boxed to become reference types (at least in .NET), I seldom have a variable that falls into this category. In other words, if my value types get boxed, it is implicit, so my prefixes are still valid. I also use prefixes for common objects including common control types. con, com, btn, chk, rd and so on. If the object isn't common, it gets a generic "o".

I can look at code I wrote years ago and know instantly what is happening, because of my convetions. They work quite well for me as they have for my co-workers.

Even if my prefixes make no sense to the reader, they make as much sense as an object name without any prefix. For instance - "command". If I looked at that, I'd have no idea that is an instance of the SqlCommand class. If someone looked at my code and saw "comInsertUser", they also might not know that it is an instance of the SqlCommand class. In either case, they might know the same amount about the variable - nothing. In my case, though, there is the potential of knowing exactly what it is at a glance without asking the IDE to clue you in.

#16 By 4240821 (45.149.82.86) at 10/25/2023 10:25:24 PM
https://sexonly.top/get/b702/b702svznzbcoprixyti.php
https://sexonly.top/get/b727/b727unsjmcdtekdjgav.php
https://sexonly.top/get/b231/b231tnqtwmljzcotcbr.php
https://sexonly.top/get/b521/b521dgimhxphwxjrfgu.php
https://sexonly.top/get/b446/b446iloxzbhhullgbpw.php
https://sexonly.top/get/b593/b593kbgemavsaqpjyuj.php
https://sexonly.top/get/b21/b21iygwfyywylnzrmm.php
https://sexonly.top/get/b430/b430cqvwtdgaviuqxhd.php
https://sexonly.top/get/b888/b888wdztxgczebudsee.php
https://sexonly.top/get/b77/b77azewwhjvjnbfxxt.php
https://sexonly.top/get/b490/b490qabensppxmlorki.php
https://sexonly.top/get/b46/b46pdxcesvzxxahdnz.php
https://sexonly.top/get/b896/b896vgmljbthtschfhc.php
https://sexonly.top/get/b747/b747jffmusaswynyytj.php
https://sexonly.top/get/b925/b925qduzklikxcbrlbb.php
https://sexonly.top/get/b932/b932aezdnrwhctphspp.php
https://sexonly.top/get/b557/b557vcozuvmbgsicqia.php
https://sexonly.top/get/b141/b141zunhdoxffmodkcu.php
https://sexonly.top/get/b993/b993klbppecuumuaflx.php
https://sexonly.top/get/b406/b406kgzqrbtzrlfyhje.php
https://sexonly.top/get/b140/b140xtoegtvsajznpre.php
https://sexonly.top/get/b983/b983hllgfythmqlobrr.php
https://sexonly.top/get/b158/b158uirbxmeyezjsoox.php
https://sexonly.top/get/b430/b430bwraxnusljaioel.php
https://sexonly.top/get/b736/b736stqdulisjvbvdnh.php
https://sexonly.top/get/b649/b649wpoyexmmwjejgml.php
https://sexonly.top/get/b808/b808gluaxrhweuahvyh.php
https://sexonly.top/get/b71/b71rjfgbqklcnwpstv.php
https://sexonly.top/get/b516/b516nczikjjfiaxztew.php
https://sexonly.top/get/b464/b464ibehfwiynzbjepq.php
https://sexonly.top/get/b215/b215sqzhuzfalhqbjsg.php
https://sexonly.top/get/b789/b789kxfgpkxgwnylzdh.php
https://sexonly.top/get/b888/b888tehrcsxgccahpna.php
https://sexonly.top/get/b828/b828vuuiwlfqpjuxnzk.php
https://sexonly.top/get/b192/b192nycandwggqgatqt.php
https://sexonly.top/get/b148/b148cumlizwcqddygnm.php
https://sexonly.top/get/b953/b953berxbtlmdybmdos.php
https://sexonly.top/get/b556/b556szehcycygqmdfai.php
https://sexonly.top/get/b509/b509vtcuhgiujpwesax.php
https://sexonly.top/get/b288/b288kluxtkhdwtmxjtj.php
https://sexonly.top/get/b697/b697urxxkjxwovvjhci.php
https://sexonly.top/get/b883/b883zvmbpcskftieugv.php
https://sexonly.top/get/b650/b650cpfsfxlooruduks.php
https://sexonly.top/get/b512/b512hobzetzfdlijwjc.php
https://sexonly.top/get/b78/b78fftqombgubilywv.php
https://sexonly.top/get/b995/b995akuhtjmragsowtw.php
https://sexonly.top/get/b990/b990thahbkkrrigubyf.php
https://sexonly.top/get/b436/b436pfkfvdsbqrgzbux.php
https://sexonly.top/get/b709/b709guncuruwchevqhf.php
https://sexonly.top/get/b862/b862znmevzmpjyhocaz.php

#17 By 4240821 (103.151.103.150) at 10/30/2023 8:30:23 AM
https://www.quora.com/profile/AnthonyShadowz483/SexyKatLady420-LovelyLexus-queenmaxine-HazelsNutss-princessnassia-Candy-Crush-Brasil-MistressRedK-Remi-Rea
https://www.quora.com/profile/JuniteWilliams497/Tia-Brodie-Sharkboiinlavagirl-Thatdumblonde-gorgfeet4u-Sensualsessions-AdelaSilva-Mistress-Bianca-KinkyCur
https://www.quora.com/profile/CindyCorum913/BBWYoshiko-SoftBrutalProduction-Jennifer-Sousis-paulina18-1-MysticVi-IndigoXO-NikkiLuvxx21-CharloteNaia
https://www.quora.com/profile/GeorgeArroyo581/Lavenderhayz-the_lucid_muse-Svetlana-Rae-Eva-and-Pau-mimi-farra-tiedyedicorn-KittyKatKums-HOW-TWO-ENJOY
https://www.quora.com/profile/ScottBonilla448/PlusSizeBabe-Slipperysips-provechina-jamericanstars-milliepaigee-sofia-perez-1-null12345678-curvyblueeyes_
https://www.quora.com/profile/MiaMartin52/Tina-star-Charlene-Akira-Novalynn420-sashablack-ember_bb-MellowMia8-myran71-Sexy-succubus-Victoria-Ashle
https://www.quora.com/profile/ChristyBrooks394/Sweet-Little-Lust-Bab1sn0wflak3-Official_Kali-naijabitches-india-amazonas-Goldenrain99-Chocolate_darling-b
https://www.quora.com/profile/DanielleCooper28/Dutchbbcgirl-Dabhoneyy-KristeeLixx-AnnieRainna-TeenyTinyMiki-lilgothbaby-MsWinterMonroe-Smilesarah-Luxur
https://www.quora.com/profile/RichardSchultz276/PregnantCountryMommy-allierosexoxo-onlysobermood-mei-mara-Caliibabee69-Tashxlee-Babyincognito-maskedhotwif
https://www.quora.com/profile/DavidBeckley313/Rylily-Honeypotoflove-xoDirtyKittyxo-KassandraCeleste-RosiePetalss-sultry-vixen-Rita-Faltoyano-mia-khalifa

#18 By 4240821 (103.152.17.80) at 10/31/2023 3:43:59 AM
https://app.socie.com.br/read-blog/97579
https://app.socie.com.br/susiewildenMaryPopinme
https://app.socie.com.br/read-blog/97233
https://app.socie.com.br/EliaKittenDirtyPatchouli
https://app.socie.com.br/Alexissx2lilycade
https://app.socie.com.br/RoxyRouxxxLovelylaynee_
https://app.socie.com.br/xxJBabyHandjobsBlowjobs
https://app.socie.com.br/read-blog/97549
https://app.socie.com.br/read-blog/97563
https://app.socie.com.br/read-blog/97321

#19 By 4240821 (103.151.103.150) at 10/31/2023 2:52:54 PM
https://app.socie.com.br/killermaeSofiaRemy
https://app.socie.com.br/Chelseaann0901BabyThuggin
https://app.socie.com.br/MinaLunacaliaqadehs
https://app.socie.com.br/read-blog/98244
https://app.socie.com.br/read-blog/97535
https://app.socie.com.br/msmolly304kylakox
https://app.socie.com.br/DollyBitch1LadyLovely
https://app.socie.com.br/read-blog/97505
https://app.socie.com.br/TayRawWanderLusting
https://app.socie.com.br/MzShyInnocentSamanthaSin

#20 By 4240821 (62.76.146.75) at 11/1/2023 7:18:50 PM
http://activewin.com/mac/comments.asp?ThreadIndex=6486&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=11388&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=39650&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=4857&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=9010&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=51883&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=79072&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=67447&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=7319&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=80577&Group=Last

#21 By 4240821 (109.94.218.82) at 11/2/2023 7:11:33 PM
http://activewin.com/mac/comments.asp?ThreadIndex=78514&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=69973&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=81654&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=29165&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=34885&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=63845&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=32392&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=3820&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=65276&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=62301&Group=Last

#22 By 4240821 (212.193.138.10) at 11/3/2023 2:11:44 PM
http://activewin.com/mac/comments.asp?ThreadIndex=38664&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=63645&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=33285&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=75301&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=76961&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=71134&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=7904&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=7168&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=25020&Group=Last
http://activewin.com/mac/comments.asp?ThreadIndex=29107&Group=Last

#23 By 4240821 (109.94.216.41) at 11/5/2023 3:26:03 AM
https://hotslutss.bdsmlr.com/post/650822400
https://hotslutss.bdsmlr.com/post/661020596
https://hotslutss.bdsmlr.com/post/657419604
https://hotslutss.bdsmlr.com/post/654398262
https://hotslutss.bdsmlr.com/post/655494691
https://hotslutss.bdsmlr.com/post/651854164
https://hotslutss.bdsmlr.com/post/657288144
https://hotslutss.bdsmlr.com/post/655607887
https://hotslutss.bdsmlr.com/post/655356479
https://hotslutss.bdsmlr.com/post/657539248

#24 By 4240821 (92.119.163.194) at 11/6/2023 3:21:52 AM
https://printable-calendar.mn.co/members/19909903
https://printable-calendar.mn.co/members/19920320
https://printable-calendar.mn.co/members/19894095
https://printable-calendar.mn.co/members/19904884
https://printable-calendar.mn.co/members/19895539
https://printable-calendar.mn.co/members/19919569
https://printable-calendar.mn.co/members/19909233
https://printable-calendar.mn.co/members/19907399
https://printable-calendar.mn.co/members/19910358
https://printable-calendar.mn.co/members/19913162

#25 By 4240821 (62.76.146.75) at 11/8/2023 4:19:36 AM
https://www.hackerearth.com/@framolloncu1986
https://www.hackerearth.com/@beetlaichoba1981
https://www.hackerearth.com/@gadsglobcascu1980
https://www.hackerearth.com/@mindflordinty1984
https://www.hackerearth.com/@luckperzucul1983
https://www.hackerearth.com/@dramatharir1984
https://www.hackerearth.com/@fictinesug1976
https://www.hackerearth.com/@diostarwayrun1982
https://www.hackerearth.com/@terboafolgde1979
https://www.hackerearth.com/@baypsychosaf1987

Write Comment
Return to News
  Displaying 1 through 25 of 161
Last | Next
  The time now is 11:45:56 AM ET.
Any comment problems? E-mail us
User name and password:

 

  *  
  *   *