Questions tagged [framework-design]
19 questions
37
votes
4 answers
What's the point of MethodImplOptions.InternalCall?
Many methods in the BCL are marked with the [MethodImpl(MethodImplOptions.InternalCall)] attribute.
This indicates that the "method is implemented within the common language runtime itself".
What was the point of designing the framework in this…

Ani
- 111,048
- 26
- 262
- 307
27
votes
4 answers
ReSharper complains about uppercase "ID" in member "EntityID"
I have a property "EntityID" in a class. Resharper (5.1) says
Name 'EntityID' does not match rule
'Methods, properties and events'.
Suggested name is 'EntityId'.
But IMHO according to the naming conventions in the Design Guidelines for Class…

bitbonk
- 48,890
- 37
- 186
- 278
12
votes
1 answer
Designing a GUI framework
I need to create a custom GUI framework for a project. I actually created a very primitive GUI framework which has buttons, images, text etc. But it is pretty simple and I don't have any prior knowledge of designing a GUI framework. The project we…

Canol Gökel
- 1,168
- 2
- 13
- 29
7
votes
4 answers
Best approaches for designing a well-organised ASP.NET application with modularity
I am trying to think about a web application development framework for our product development. I want to build an ASP.NET application which has many sub-modules in it. My requirements are like:
The application will be a suite of different modules…

Shyju
- 214,206
- 104
- 411
- 497
6
votes
7 answers
Should ToString be used for critical information?
I just came across some code that overrides ToString() and returns some critical information (not just debug information). Users of this type called ToString() and parse that critical data.
My opinion, from reading various bits and pieces over…

Steve Dunn
- 21,044
- 11
- 62
- 87
6
votes
2 answers
How to enable forward compatibility on a reusable .NET library?
I'm in the process of creating a new minor release of a toy project of mine. This project is released on NuGet and is compatible with .NET 4.0 and up. Some of the new features I'm introducing require .NET 4.5 (users should be able to resolve…

Steven
- 166,672
- 24
- 332
- 435
6
votes
2 answers
Why are Array.Sort() and Array.IndexOf() methods static?
Always was interested why are Array.Sort() and Array.IndexOf() methods made static and similar ArrayList.Sort() and ArrayList.IndexOf() are designed as member methods. Thank you for any ideas.

Alexander Prokofyev
- 33,874
- 33
- 95
- 118
6
votes
1 answer
Why can I lock on any object type in C#?
Can someone explain, in detail, why it's possible to lock on objects of any type in C#?
I understand what lock is for and how to use it. I know how it expands to Monitor.Enter/Exit. What I'm looking for an explanation of the implementation detail…

Andrew Russell
- 26,924
- 7
- 58
- 104
5
votes
3 answers
Is it good/common sense programming practice to make all methods return a MyResult object in PHP?
Working through several layers of an MVC architecture designed program, I find that I would like to have more information on a deeper layer's method return result, and that it's not always that I can anticipate when I'll need this information. And -…

Pedro Mata-Mouros
- 186
- 2
- 9
5
votes
2 answers
How should I implement session storage on node.js
I'm creating josi, a web framework for node.js. And I'd like to add session storage. What would be the best way to implement this? I'm assuming it probably has to be cookie based, but I'm interested in knowing if any other frameworks have a…

thatismatt
- 9,832
- 10
- 42
- 54
3
votes
1 answer
Understanding Asp.Net Identity Interface Design Strategy
All I*Store interfaces provided in Asp.net Identity Framework are inheriting from IUserStore. This force the implementation of every interface to implement User related methods or have single class inherit them…

jd4u
- 5,789
- 2
- 28
- 28
2
votes
3 answers
What is the better data structure to design a class for song play station with my requirement?
I have to come up with a Class and Data Structure Design for a "metric" system to determine the top song of a * band..
The class should have Two Web Service calls
void play(String bandname, String songname);/*This method has to play song with the…

Thangakumar D
- 714
- 5
- 12
- 27
2
votes
1 answer
Framework design using 'self' argument for simple functions (not class methods)
I have at work a framework (designed by a programmer which is considered the most experienced in our organization) that has the oddest structure I had ever seen. The framework has a lot of APIs, all with the same structure:
each API (function) has…

nicksorin
- 23
- 4
2
votes
2 answers
Generic Collection inheritance
I'mm building a WPF app with MVVM and am using ObservableCollection. While working on my ViewModel, I decided to inspect the type definition of the ObservableCollection and I saw something that I thought was odd:
// class definition for…

Glenn Ferrie
- 10,290
- 3
- 42
- 73
1
vote
1 answer
PHP Using object as var
Dear all PHP developer.
I am thinking of implementing different approach on my PHP Framework.
I tried to search for solution but I could not get what i am after. I have a class Property. It has many protected properties one of them is $value.
My…

Narayan Bhandari
- 426
- 3
- 11