ScriptUO

Casa de TrailMyx => Programming / Operating Systems => Topic started by: OMGBurgers on August 12, 2008, 08:09:58 PM

Title: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 12, 2008, 08:09:58 PM
Well I downloaded the microsoft visual web developer express edition and decided to go with the ASP.NET w/ C#.  Create a SQL database, add a table, add some entries and I feel like I'm getting somewhere.  Then I start reading all these tutorials & crap and I get all confused and frusturated and give up hahaha.

Stupid computers.

I think I'll stick to just uo scripting for now & maybe find some better tutorials or easier ones later on lol.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 12, 2008, 09:34:16 PM
Well, keep going with what's working for you.  I've found that some of the sample tutorials/code isn't really helpful.  But just keep it small for now and add little bits.  You can get overwhelmed if you try and start something too big and then just give up.  I did that a few times when I was learning windows programming originally (back in Windows 3.1 days when I was writing device drivers)
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 12, 2008, 09:44:19 PM
I found a LOT better tutorial to use now.  I read about 15 pages of it but didn't really try it yet.  I'll give it a go sometime tomorrow ;P  It's so much more clear and descriptive.  I think I'll start with just learning basic statements & structure for now.  I did some VB a long time back & could pick up on it easy, but if I gota relearn it I may as well go for C#.  Oh well, that's tomorrows project!  Maybe I'll have a nifty little web application to show eventually haha.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 12, 2008, 09:47:28 PM
Look for the Jesse Liberty books from O'Reilly for C# reference.  They are really the best I've come across so far.  The three books I use mostly are:

Learning C# (good starting reference)
Programming C# (great comprehensive, easy to read book)
C# Cookbook (Not by Jesse Liberty, but I highly recommend this one so you can get ideas about data structures, etc)
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 12, 2008, 09:48:45 PM
And the BEST custom controls book I've found so far is from Apress by Matthew MacDonald, "Pro .NET 2.0 Windows Forms and Custom Controls. in C#"  This one is really really good!!
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 13, 2008, 07:23:17 AM
I'll check all of them out :P

I would like to get a good book or two, but since I'm in 'poor' status I have to wait haha.

Right now everything I learned so far has been very little actual programming.  Setting up the databases, configuring things etc.  I guess once I think of some project to do that has to meet a certian goal I'll really have to start with some programming to start doing the things I need it to do.

At least I figured out some of the basics haha.  The first hour today was more successful then all of yesterday it seems ;x
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 13, 2008, 11:42:57 AM
gah im getting mad haha.

im doing these tutorials on sql databses and using them in my asp.net web application.  so i make this database in the studio, then i close out and i'm supposed to connect to the sql server or something.  i didnt have the right application.  So I'm like ok SQL sever 2005 isnt it, i need to upgrade to 2008.  So I upgrade to 2008, still not the right application.  Then I find out I need SQL server management studio express (free).  I download that.  It don't work with sql server 2008.... only 2005 or older...  *bleep*.  Uninstalling sql server 2008, removing/reinstalling sql server 2005 just incase now.  I swear if this don't work.... hahaha.

I'm about ready to break down from using all this legit free *bleep* offered, and tell my father to get me the full 2008 studio. ;/
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 13, 2008, 11:49:01 AM
Any time I've done database interfacing in Windows, I've used ODBC and then had the appropriate MySQL or PostGRES driver to interface with.  With that scenario, I've never had an issues with any database functions.  It's an extra layer, but I've found that it works pretty well (can even talk to Access databases then).
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 13, 2008, 02:01:44 PM
I shall keep that in mind!  Right now it seems to work.

Got my log in & register stuff working.


Now the only thing that is a bit odd now is the indent style!


Which is why I never used the auto indent on scriptuo haha.  I indent like:
Code: [Select]
if X...
   {
   ...
   ...
   if Y...
      {
      ...
      ...
      }
   }

But it's like:
Code: [Select]
if X...
{
   ...
   ...
   if Y...
   {
      ...
      ...
   }
}


So... I guess I'm going to change my indent style now haha, which isn't confusing me too much, but it's wierd.  it is really easy to read though already, which I assume will get easier once I get used to it more.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 13, 2008, 02:07:52 PM
You can read my little treatise for indention in the Q/A section:

http://www.scriptuo.com/smf/index.php?topic=190.0

I plan on adding more, but for now I'm going with the industry standard.  ;)
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 13, 2008, 02:20:47 PM
Honestly, I'm not certain why so many EasyUO scripters indent using Whitesmiths style...  I'm somewhat baffled by that since most everyone else that does C (K&R), and any Visual Studio product will always default to Allman.  But when you see EUO scripts, it's that funky Whitesmiths...
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 13, 2008, 04:58:12 PM
haha i have no idea either.

I learned vb years back and i always indented like that.  my father has programmed longer than ive been alive and i asked him how he does it, and he does it the way scriptuo and all this c# and all does.  So I have no idea why I do it this way.

On another note I'm off for pure c# tutorials as I have covered everything I need for the moment in the asp & sql for my needs until I get into developing other sections of this project.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 13, 2008, 11:29:07 PM
haha i have no idea either.

I learned vb years back and i always indented like that.  my father has programmed longer than ive been alive and i asked him how he does it, and he does it the way scriptuo and all this c# and all does.  So I have no idea why I do it this way.

On another note I'm off for pure c# tutorials as I have covered everything I need for the moment in the asp & sql for my needs until I get into developing other sections of this project.

Always listen to your father...  :)
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: iamwin on August 14, 2008, 05:53:49 PM
K&R all the way for me. Except EUO (cause you can't) I stick to allman. Whitesmiths for the fail.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 14, 2008, 06:06:51 PM
K&R all the way for me. Except EUO (cause you can't) I stick to allman. Whitesmiths for the fail.

Who the heck got all the UO scripters to start indenting in Whitesmiths anyhow?  lol.  Failz.  Makes me twitch.  That's ok, with ScriptUO, once you run the auto-indention you're stuck in Allman.  heh.  My way to make the world right again because there's no UNDO for that function!!  MUHAHAHA.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: gateCrasher on August 15, 2008, 06:34:00 AM
Look for the Jesse Liberty books from O'Reilly for C# reference.  They are really the best I've come across so far.  The three books I use mostly are:

Learning C# (good starting reference)
Programming C# (great comprehensive, easy to read book)
C# Cookbook (Not by Jesse Liberty, but I highly recommend this one so you can get ideas about data structures, etc)

Oreilly books are legendary for being easy to follow without all the useless filler that you find in a lot of books. I think that's why they've been so successful, they are great reference books yes, but also great how to books.

/gC
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 15, 2008, 09:05:50 AM
Yeah I'm going to have to buy a book shortly haha.  There is enough well written tutorials/documentation of mvwd on asp.net which coveres most everything in the software, and a large variety if not about all the controls.  So I got enough to currently cover me since right now I just want to handle mostly a database, maintain it, display it, & allow actions based on table values etc. But I find it hard to find some good c# on the net that isn't 90% random rambling (I wana get straight to the point haha) so I lose intrest in finding help fast.

I decided for a first project for learning I should pick something that I want the project to do, so I have goals to meet.  So I choose to do something UO related that was somewhat simple.  Then I decided to just replicate the uo.tradespot.net website.  I figure my application can do everything thiers can, from there I just expand upon it, make it more user friendly etc.

At the moment I only have just the basics.  Sign up/register, login/out, user control panel (basic settings like display email, icq, aim, pw change etc.), admin pages to maintain the whole user base & other parts.  From there I created a user list like the member list on this page & that's where i stopped.

I'm going to create the buy/sell/trade sections now & get all the posting up for that.  I'd like to keep them seperate from the actual forum system, but still link everything together obviously (user info, post count etc.).  But the 'forum' part will obviously have a bunch more options & view settings.

My problem now is I would like to do custom series of data access, display, modifications etc. based on user interaction, but I haven't learned enough c# to do so.  It's all basic really since its only access/display/modification/adding to data lol.  I really need to learn the basics now of how things are structured.  The only thing that is the same that I know from like vb is like a simple if statement haha.  But now i need to learn how a basic for, loop, while etc.

Hopefully I can afford to buy a book soon since I'm not working again cause of this move haha.  Books made learning VB along time ago really easy.  Since I understand a lot from doing years of vb/scripting it'll be easier since i'm not completely new to 'programming' haha.  I just gota learn the c# language.

Oh well I'm slowly making progress in it.  I just wish it was as easy as scripting for uo is for me hahaha :P
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 15, 2008, 09:38:34 AM
Don't worry, the syntax will come.  I'm still learning daily when I'm programming in C# since it's such a rich language.  But I started off very limited, got the fundamentals, and the tackled some of the more advanced topics.

But you really should look for the first two books on my list.  They have been essential for me to learn.  The first one I picked up at Fry's on the bargain books section for like $14.00.  I liked it so much that the advanced book I bought for full price.  However, you should check amazon.com and their used books section.   Often times you'll find really expensive computer books for next to nothing.

But you just can't beat having a book sitting next to you that you can thumb through.  I will never get to the point where I can live paper-free; I just need that paper reference to set next to me while I puzzle.  Plus 12X will appreciate all that extra toilet paper.  ;)  Mined the paper cuts!
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: TrailMyx on August 15, 2008, 09:57:15 AM
BTW, just moved this here.
Title: Re: So I wanted to learn some C# & asp stuff or whatever...
Post by: OMGBurgers on August 15, 2008, 12:05:25 PM
haha yeah the book will be nice.  I'm getting sick of switching windows to my web browser, especially since i like to operate in full screen ;(

I'm kind of stuck on what i want to do with this gridview but i think i know why.  I configured the datasource & all before runtime w/ wuerybuilder but I think to be able to do what I want to do I need to configure that all during runtime or something.  I duno haha I did it on another page but for a single table, but I used querybuilder to build this so I'm not sure now to do all that in code yet, guess i'll learn.  I did do some coding finally on my own.  Learned the while, for and all decently.

It's fun though.  Soon as I get this stupid thing done I think before going into more c# i'm going to try to format everything better.  everything is all wierd looking and colums are all bad and get set to whatever they want width wise ;(