Quantcast

Maximum PC

It is currently Tue Oct 21, 2014 4:32 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: .NET Parallel framework
PostPosted: Fri Apr 24, 2009 10:21 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
Since I haven't been on these here forums, for goodness how long (due to school then working and traveling). I'm gonna try to be more active here, so in lieu of this:

http://msdn.microsoft.com/en-us/concurr ... fault.aspx

What do you guys think about the upcoming .NET 4.0 framework with ParallelFx?

For the newbies :) Parallelism is executing code in one or more processor cores. Parallelism differs from threading in that threading deals with executing different threads of work (execution code) where parallelism executes a portion of work amongst different processors.

Personally, I'm excited. .NET 4.0 is going to introduce a LOT of power to developers. However, it feels like I'm going to be spending time learning a new pattern for both threading AND parallelism.

If you guys are planning on using .NET 4.0, how do you intend on using it?


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 10:49 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
We are still writing .NET 2.0 applications here :)

I need to try to keep up with it. A lot of business I think are "slower" to move to new frameworks.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 10:52 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
CrashTECH wrote:
We are still writing .NET 2.0 applications here :)

I need to try to keep up with it. A lot of business I think are "slower" to move to new frameworks.


If I weren't developing for Sharepoint, I'd be on 3.5 right now. I'm using 3.5 on my pet projects. I was using .NET 3.5 and, let me tell you, LINQ will make your life easier.

I love LINQ:
Code:
var query = from t in table
                  orderby t.Createdate ascending
                  select t;


Beautiful man, beautiful.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 10:54 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Haven't used LINQ. Not sure I am a fan of dropping that stuff right in the middle of my code.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 24, 2009 12:18 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
CrashTECH wrote:
Haven't used LINQ. Not sure I am a fan of dropping that stuff right in the middle of my code.


Well, LINQ is an umbrella term. LINQ can be used for collections.

Code:
//return a subset of ints in the list
int[] myInt = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
var anInt = myInt.Where(x => x >= 2 && x <= 9);
List<int> listOfInts = anInt.ToList();

//return the first element in the list
int[] myInt = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
var anInt = myInt.Where(x => x >= 2 && x <= 9).FirstOrDefault();
int thisInt = anInt;


It makes finding things inside collections (anything that implements IEnumerable and IQueryable) easier. The examples above do no justice but a good primer on it.

Highly recommended. I use LINQ pretty much exclusively now, it makes writing a Data Access Layer easier and if you use LINQ to SQL, it will generate business objects for you. :)


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.