As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've recently been tasked with pulling together 4 independent developers at my company into a cohesive team that generates similar (and good) code as a team.
We're implementing the use of iDesigns C# coding standard which will help our code look similar, and does give some implementation guidelines, but is there a general standard, rules of thumb (Top 10) out there for how code should be built, what every class should 'have' or 'do'?
I read this article by John Connelly about implementation practices, but am not having much luck in finding more references on the subject.
Is there a Implementation 'standard' out there for c# classes/projects? or is it such a broad subject that it can't be defined?
My favorites:
http://csharpguidelines.codeplex.com/releases/view/46280
Microsoft's Design Guidelines for Developing Class Libraries
StyleCop
Although it isn't a standard as such, I'd strongly recommend considering the use of StyleCop. It's a highly customizable Visual Studio plugin that allows you to easily enforce coding standards. Additionally it can be integrated into your cruise control server build, so that if any of those standards aren't adhered to, it breaks the build.
A very useful little tool, that at first I hated, but now I love.
The only C# standard C# has is the "Standard ECMA-334 C# Language Specification". Anything beyond that is up to the developer to do as they wish as they code their program.
Now there are some good rules of thumb to follow (like the two you referenced) but they are just rules of thumb. As long has the entire team is consistent with each other you can do whatever you want as a "standard".
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm running some analysis tools on our build like StyleCop/FXCop.
What i'd like to achieve is auto-correct some of the warnings produced by these.
Do you think this can be done using the Roslyn CTP? is there any other tool that allows:
Scanning my code text for some rule not being followed.
Replacing this with the correct code.
Some of the operations can be done using a simple text replace of the VS editor, but more complicated things require use of some other tool.
So my question is - to this end, is the Roslyn CTP the tool to use? or what other tools exist for .NET for doing this?
This is certainly one of the scenarios that Roslyn addresses. Take a look at this walkthrough that demonstrates how to write a "Quick Fix" using Roslyn. In fact, the CTP also ships with a couple of samples that demonstrate how one could write stylecop / fxcop style rules using Roslyn.
You can also glance through this document for an overview of the overall scope of the CTP.
Disclaimer: I work for Microsoft on the Roslyn team.
OP asks, "what other tools exist for .NET for doing this?"
Our DMS Software Reengineering Toolkit is a source-to-source program transformation tool.
DMS can parse, analyze, and transform source codes for many computer languages such as C++, Java, COBOL, and particularly including C#. It can also handle multiple languages simultaneously.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I've been learning programming for some months now, mainly with java and C#. They seem so similar from my limited knowledge, so I'm trying to grasp an understanding of the practical differences. Could seasoned programmers please enlighten me as to which programming language is more suited for which kinds of jobs?
In what situation would you say "To create this kind of software, java is more suitable than C#" or "To create this kind of sofware, C# is more suitable than java"?
Java was originally designed to be the portable solution. If you need something to run on multiple operating systems you would probably want to go with Java.
From my experience in the financial world, the trend I see most commonly is Java being used on the backend (typically Linux servers) and C# (WPF) being used on the front end. I think this trend is here to stay until either Mono becomes widely accepted or Microsoft figures out a way to make their Server OS's free :)
I'm not saying Java is more suited for back end than C# (although I do think WPF has the edge over anything Java has for front end development) all I'm saying is that this is a very common trend in many financial/trading systems.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Can you suggest me a possible way to get started with CEP in C# ?
By what I mean when I say, get started:
A good book talking about CEP and C#
A library which deals event clouds
Some sample codes using the library
Some good quality codes in general to get a possible feel of the problems
Good blogs
Anything else you might feel necessary to add for someone getting started in CEP and C# will be helpful.
Thanks
Soham
There is no such book. Yet. There is an upcoming book in the next couple of weeks from Manning called Event Processing in Action, it is a 'must read'.
For C#, the obvious choice is StreamInsight from Microsoft. There's a collection of useful links here: StreamInsight Info
Apart from that, there's StreamBase, Oracle CEP Server, ruleCore CEP Server and the open source Esper. Most (not Esper) vendors take a language neutral approach so you would not need to care in which language the CEP product uses when sending events into it.
From your question it sounds as you would like to do CEP programming. Many tools have a higher form of abstraction. For example StreamBase have a nice GUI where you select different functions from a palette of icons and then connect them in order to make it do what you like.
The ruleCore CEP Server has a high level declarative language where you specify the CEP rules using XML. Both these approaches are in my view not programming.
Esper and StreamInsight are good examples of putting CEP functionality in there that can be reached from your normal programming language. So if programming is what you like to do, StreamInsight is a good candidate.
No, StreamInsight does not require learning XML. But even if it would, basic XML is very easy to learn...
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What are some of the open source projects out there that you would hold up as shining examples of projects that correctly and effectively use enterprise sofware patterns and best practices such as Inversion of Control, Model-View-Controller, Unit Testing, etc.?
For purposes of this question the project should:
Include source code that illustrates the pattern in use, and
Be doing something important and useful, i.e. not using the pattern frivolously just because it is flavor of the week. Hence the words, "Correctly and Effectively" in the question
It should be software that you could show to the people who work for you and enthusiastically be able to say, "I want you to do it the way these guys did it."
Most of the GNU project is very very well written, over a very long period of time, with strict guidelines.
Prism is very good for MVVM in WPF and Silverlight
patterns they use Patterns in the Composite Application Library
An objective pick would be the Spring Batch project.
How did I pick it? Judging from the technical debt as seen on the Nemo Sonar instance, Spring Batch has the lowest debt/line ratio for projects larger than 10k lines of code.
When I first looked at the source code for DotNetBlogEngine, I was impressed at how well it was organized. And it didnt couple any of its components to the interface, making it extremely flexible.
It's not a terribly huge project either, not like trying to recompile your own linux kernal or something. So you can dive in quickly and have some fun with it.
Castle project
You can try this book - Beautiful Code
The author has collected some experience-sharing articles of open source projects. e.g. Python's Dictionary Implementation, Subversion's Delta Editor, etc.
You mean Spring? Or projects that use it?
UPDATE: WebWork, Guice, and Spring Security all fit the mold.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Most C# developers developers, like me have a good solid grasp on the .net framework and the C# language. But I've yet to come across a book that can take a very good c# developer to the next level of C# mastery.
I am looking for a book that can help me make that transition. Dealing with issues like theory on having more robust C# code when connecting to external systems etc. Error logging techniques, and generally better memory usage, and re factoring.
Anyone know of a good book, that's worth the read?
Jon Skeet's "C# in Depth" is pretty good: http://www.amazon.com/C-Depth-Jon-Skeet/dp/1933988363/ref=sr_1_1?ie=UTF8&s=books&qid=1259183768&sr=8-1
Effective C# and More Effective C# by Bill Wagner come highly recommended
If you're a very good C# dev, you should perhaps look beyond a certain language and technology and try: Domain Driven Design. It's a great book and promotes ideas that help writing great software.
The best book I have found for C# internals is CLR via C# by Jeffrey Richter.
Not a C# book per se, but Design Patterns (Gamma et al) might be a good introduction to more abstract, architectural concepts.