Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Array, ArrayList, IList<> and Hashtable, IDictionary<>  (Read 29375 times)
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« on: December 02, 2007, 10:06:10 »

Going through the AS3 implementation, Cliff has made a concious decision no to use some datatypes so as not to tie down the implementation.

When it comes to silverlight and .NET though, the core datatypes are not as flexible as their AS3 counterparts (ie Arrays require a size and can't be indexed by name)

So to what degree should we implement the .NET datatype? We could use relitivley low level ones such as ArrayList and Hastable? or go the whole hog and use Generic collections which gives type safety?

Any thoughts?

Matt
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: December 02, 2007, 01:30:07 »

Matt,

I think the lowest level possible is best to begin with.

When we get some more folks using and thinking about this, we can discuss whether it makes more sense in the .NET world to use the Generics within the framework or not.

What about unit tests, is it NUnit we need to use?
-=Cliff>
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #2 on: December 02, 2007, 02:48:06 »

ok, i'm happy to go with this (could help with things like mono and backwards compatability)

We will definatley be using NUnit for the unit tests.
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #3 on: April 08, 2008, 12:08:25 »

Hi Cliff,

Ok, as part of my update of the Silverlight demo, i have noticed that silverlight no longer has support for the basic datatypes in favour of generics. I'm not sure if you know about generics, but it's basicaly a typed list, ie a list that will only accept values of a certain type.

My question is, what route do you think should be taken? Should the C# framework be updated to use generics throughout (which will no longer work for .NET 1.0) or do we create another version?

What do you think?

Matt
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: April 10, 2008, 08:11:48 »

Sure, I know about Generics, they were added to Java as well. A good thing for sure, but thats a pretty nasty situation now, isn't it? How does this bode for Windows Mobile (.NET Compact) or .NET server-side development?

And pardon me, but how the H*&%$ can they drop support for basic datatypes????? That's rhetorical mostly, but I'd be interested if you know what the heck they're thinking? I can see making Generics an option. Sounds as if it might be necessary to branch the codebase in the repository and make both branches available for download. Future changes will need to be made to both branches. A pain, but hopefully we're not looking at many changes really.

-=Cliff>
Logged
trilec
Sr. Member
****
Posts: 52



View Profile WWW Email
« Reply #5 on: April 10, 2008, 09:14:23 »

could the STL (standard template Library) be used for this functionality ?
Or is that what you mean by generics?

T
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #6 on: April 10, 2008, 01:49:37 »

.NET Compact Framework, ASP.NET and even Mono seem to all support generics, so the only potential casualty is .NET 1 (Please correct me if i'm wrong)

They have said that they are going to maintain support in the main .NET framework, but only for backwards compatability and seing as Silverlight is new, they aren't bothering keeping the basic types as there shouldn't be any backwards compatability issues.

Branching the repo is gonna be a bit of a pain, but it might be the only way forward. Maybe we can see how popular each one is over time and if nobody uses the non generics one, just leave it on the back burner.

trilec

From what i have found on google, STL does seem to be the same as generics (Again please correct me if i'm wrong)
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #7 on: April 11, 2008, 04:38:47 »

I think a branch is the only way we can really go right now. The old stuff goes on the branch and the trunk becomes the new stuff.

I'll be returning to the US next week and will coordinate this branching.
-=Cliff>
Logged
mbaird
Newbie
*
Posts: 1



View Profile Email
« Reply #8 on: April 11, 2008, 11:03:15 »

Quick note, guys. As far as I know, Silverlight has support for the basic datatypes. It's the pre-.NET 2.0 collections that it does not support anymore.

You can see a mapping of the old to the new here. As Gradiation said, this will make PureMVC for .NET 1.0 obsolete (if PureMVC moves forward with this deprecation). However, shouldn't PureMVC for Silverlight be a different branch, due to the different goals of Silverlight vs desktop/server .NET?

Sorry if I jumped the gun on anything; just trying to clarify as I read it. My two cents ;)

-Michael
Logged
Gradiation
Port to CSharp
Full Member
*
Posts: 41


View Profile Email
« Reply #9 on: April 12, 2008, 08:00:26 »

Hi Michael,

Thanks for the link, very usefull.

One of the things we were trying to do with the C# port (and where the beauty lied) was that the one code base worked across all the platforms (ie .NET, .NETCF and Silverlight). This kept the maintenance down.

By spiliting the project, this will mean that another code base has to be maintained, making it that little bit more time consuming, when that time could be spent on better things like demos.

Matt
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #10 on: May 14, 2008, 05:16:54 »

Yes, thanks Michael. I've been wanting to see something just like the link you posted. Looks like we want to stay away from Dictionary in this new version and use HashTable for the observerMap and things like that.

-=Cliff>
Logged
Pages: [1]
Print