CodingRendle, Learn me plz.

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.1 
As I never did the uni thing properly, and you refused to give me any cash in lieu of this, I've decided to collect the debt of knowledge you owe me directly.

I want to make a fairly simple app in C#. I do not know any C#. I have, once uppon a time, dabbled my toesies in PHP and C/C++, but not for a while. But still, I figure that if you can do C# then anyone can.

Why C# I hear you cry? Well, may as well get to grips with something that's new and, by all your accounts pretty good.



What My Applimication Needs To Do


  • Interface with some sort of database.
  • Display information from said database in a pretty and useable way.
  • Have various cunning, time-saving ways of putting data into the database.
  • Use lots of stuff about Dates and stuff.



So, could you (or, indeed, anyone) please point me in the direction of decent interweb sources for learning how to do the above?

Kthxbye.


The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  koswix     
33880.2 In reply to 33880.1 
Right, I'd recommend getting Visual C# 2008 Express (unless you have access to a better edition) and the Training Kit from here.

You can also get SQL Server 2005 Express for your database needs.

For database access, there's LINQ to SQL, which wraps your database in classes and lets you write something similar to select statements directly in your code:

code:
from customer in databaseContext.Customers
where customer.Town == 'London'
select customer;


LINQ gets way better than that, but that's the simplest implementation.

For displaying the data, you've got WPF, which uses an XML language to layout your form and can do all kinds of clever databinding. The LINQ to SQL stuff will also handle updating the database with the changes from the UI.

Dates and stuff are pretty easy. There's a DateTime type, and a TimeSpan as well, which make comparisons and calculations very easy.

Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.3 In reply to 33880.2 

Awesome. I grabbed C# Express last week, but then went away over the weekend so haven't had a play with it yet, and I'll grab the training kit now.

 

Another thing: If I use SQL Server express as my database thinger, does that mean that SQL Server Express would need to be installed on any PC that I wanted to run the app on?



The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  koswix     
33880.4 In reply to 33880.3 
Yes, it would. The other alternative is to use SQL Compact Edition, which I'm currently learning about myself. It allows you to distribute a handful of DLLs with your app.

Only issue with that is, you have to use a command line tool called SqlMetal to generate the LINQ wrappers, as described here.

Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.5 In reply to 33880.4 

Irk. That looks scary.

 

Maybe flat files are the way forward...



The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  koswix     
33880.6 In reply to 33880.5 

Or there's LINQ to XML...

 

Seriously, LINQ is the greatest new thing I've seen in programming since C++.


Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.7 In reply to 33880.6 
Does LINQ allow multiple WHERE functions, or does it force you to use an AND operator?

ie:
code:
.where(this==1 || that==2)
.where(this==5 || that==7)

vs
code:
.where ((this==1 || that==2)
    && (this==5 || that==7))



It really bugs me about SQL that you can't stack WHEREs; it would make queries a billion trillion squillion times more readable.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.8 In reply to 33880.6 
XML could work quite well, actually. Hmm - think I'll look into that option.


The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Peter (BOUGHTONP)     
33880.9 In reply to 33880.7 

If you're coding in the structured where() style, then you can where().where().

 

If you're coding in the natural query style, then you can &&.

 

It's very flexible.


Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.10 In reply to 33880.9 
Oooh, you now have me interested. :)


Daily Irritation #2 with SQL is having to repeat every single non-aggregated field name when grouping.
(ie: SELECT SUM(a),b,c,d,e,f,g,h,i FROM table GROUP BY b,c,d,e,f,g,h,i )

Does it fix that too?
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Peter (BOUGHTONP)     
33880.11 In reply to 33880.10 
I don't know, I haven't played with grouping yet.

Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  DSLPete (THE_TGG)  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.12 In reply to 33880.6 
Looks like a rip off of hibernate to me.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  DSLPete (THE_TGG)     
33880.13 In reply to 33880.12 
Hibernate is an Object Relational Mapping framework.

LINQ is an implementation of functional programming principles in imperative languages. It facilitates declarative programming, where developers can say what they want to do, rather than how they want it done, leaving the compiler to decide the best way to do it. It's a massive paradigm shift in programming languages and will enable all sorts of future good stuff like many-core parallelism without the need for understanding threadpools and such.

What you've done is, you've focused on the LINQ to SQL technique of wrapping the database objects in code objects in order that the LINQ framework can access the database. That's a very, very small part of LINQ, and it's really a library for LINQ, rather than part of it. You could do LINQ to Hibernate if you wanted to.

ADO.NET Entity Framework, which is due later this year, is similar (i.e. an alternative ) to Hibernate, but it brings some extra goodies to the party that make it a very attractive alternative.

Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.14 In reply to 33880.13 

>>leaving the compiler to decide the best way to do it

 

So it's Visual Basic, then?



The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  koswix     
33880.15 In reply to 33880.14 
>:-(

Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.16 In reply to 33880.15 
Hah! You knows it!


The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and not by the buttocks. The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.17 In reply to 33880.6 

Bloody .NET 3.0 stuff. I'm still in 1.1.

 

Yeah, you heard me, 1.1. We're upgrading soon. To .NET 2.0. I'll probably leave before that happens.

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Ally     
33880.18 In reply to 33880.17 

If they're upgrading anyway, they might as well go the whole hog and jump to Visual Studio 2008 and .NET 3.5. It's still the 2.0 CLR (well, slightly service packed), but with a bunch of other libraries.

 

Is it an internal system or a marketed package?


Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

 From:  Ally  
 To:  THERE IS NO GOD BUT (RENDLE)     
33880.19 In reply to 33880.18 

Well we'll be (AFAIK) using 2008, because it can target 2.0. So at least I'll benefit from some of the new stuff. They did state the reason for not moving to 3.5 yet, I believe it had something to do with SQL Server 2008... I'm not involved in that side of things though, so I know bugger all details.

 

It's sort of internal, sort of not. We're a local government body that has a lot of "affiliated" groups/organisations using our software. But we don't control the machines in all of them.

0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Ally     
33880.20 In reply to 33880.19 

SQL 2008? I'm quite happily using 3.5 stuff against SQL 2000 and SQL 2005.

 

Does the project use any web services or remoting, or involve any kind of workflow? If so, they'd be mental to ignore WCF or WF. Tell them I said so.


Dance like it hurts; Love like you need the money; Work when people are watching.
0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–23

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats