My organization has begun slowly repurposing itself to a less product-oriented business model and more contract-oriented business model over the last year or two. During the past year, I was shifted into the new contracting business to help put out fires and fill orders. While the year as a whole was profitable (and therefore, by at le...
I come from a C++ background where I can use template mixins to write code that refers to FinalClass which is a template parameter that is passed in. This allows reusable functions to be "mixed-in" to any derived class, by simply inheriting from ReusableMixin with a template paramter of MyFinalClass. This all gets inlined into the clas...
I am using a Cairngorm MVC architecture for my current project.
I have several commands which use the same type of function that returns a value. I would like to have this function in one place, and reuse it, rather than duplicate the code in each command. What is the best way to do this?
...
This came up in a conversation I was having online, and it occured to me that I have no idea how this is supposed to work: Quite a lot of programmers seem to just take as a given- indeed, obvious that classes are a necessary language feature for managing huge software projects.
It's not obvious to me how they do this.
My question to yo...
I'm trying to build up a library of reusable code to use from project to project. As I write code snippets and components, I'm trying to decide which libraries I will get the most use out of long term VS will I really use this again?
What code or components do you reuse that should every developer have?
I'm primarily interested in .net...
I'm working on a web-enabled version of our existing winforms project. Gridviews seem to be an ample replacement for the datagrids that we've been using. We have extensive table styles written for the old datagrids. Is it possible to reuse this code to apply a style to a gridview?
If a re-write is necessary, what is the best way to s...
I've worked on a variety of projects and there seems to be some debate as to what is better. I prefer to only share code on internal projects at the binary level (assemblies in .NET, for example). But I've worked with plenty of people that would rather share code at the source code level. I say that adds too much risk of a breaking ch...
This came about mainly due to answers to SQL questions. UDF's and Sub Queries are intentionally omitted because of performance. I didn't include reliability not that it should be taken for granted, but the code has to work.
Does performance always come first? So many answers are provided with performance as the main priority. My users s...
If your company or project places an emphasis on (or at least appreciates) the development of code and components that can be reused and shared across projects, what are the "social engineering" things you've needed to do to facilitate the re-use the code?
In my experience, code or components that are simply stated as being "reusable" w...
We have a blog system that we sold to a number of different customers (included in many different projects). This system includes a number of different files – a few aspx pages, one or two ascx controls, one css file, one javascript file and some codebehind/vb.net utility files. In general 90+% of this module is the same between custom...
I have a user control (a user details form) which has a lot of javascript and css attached to it.
i'm struggling to make my control decalre that it needs a certain file so it will be included in the "head" section of the html.
I also wonder what happens if i enter mutiple instances of a control (the is no InamingContainer or anything si...
Couple of year ago I when to work for company as web developer. It has my first Sirius web development job, (ASPx/C#) so it has very exciting and I learned a lot about that world, from the developer point of view.
In that group we had a concept for the pages where loaded in the page UC’s (User controls), I don’t know if it’s the same in...
I have being reading and tracking some questions on code reuse and I have this question:
Are there any tools to identify duplicate or similar code?
I have googled this a while ago and found nothing good.
...
I'm trying to iterate over a directory which contains loads of PHP files, and detect what classes are defined in each file.
Consider the following:
$php_files_and_content = new PhpFileAndContentIterator($dir);
foreach($php_files_and_content as $filepath => $sourceCode) {
// echo $filepath, $sourceCode
}
The above $php_files_and_c...
I want to build up styles in XAML, e.g.
<UserControl.Resources>
<Style x:Key="MyStyle" TargetType="TextBlock">
<Setter Property="Margin" Value="2,2,2,2" />
<Setter Property="Foreground" Value="DarkRed" />
</Style>
<Style x:Key="MyBoldStyle" TargetType="TextBlock">
<Setter Property="Style" Value="{Stat...
I have a v-large number of hierarchical structures (or DTO's) that are shared across different business logic, application tiers, web service and WCF contracts. I want to refactor all of my code to split the structures into discreet business domain areas.
Two questions:
Are there any tools that can help me do this (given that I want c...
Recently, I've got a dangerous idea into my head after reading this blog post. That idea can be expressed like this:
I don't need most of what the C++ standard library offers. So, why don't I implement a less general, but easier to use version?
As an example, using the STL spits out reams of incomprehensible and mangled compiler errors...
The scope of the project I'm working on is being expanded. The application is fairly simple but currently targets a very specific niche. For the immediate future I've been asked to fork the project to target a new market and continue developing the two projects in tandem.
Both projects will be functionally similar so there is a very str...
Emphasis on structure:
Code layout/interfaces
Physical file layout etc.
Naming of files and classes etc.
My understanding is that if the implementation is completly different then your ok to use the layout as that can't really be 'copyrighted'?
For example if a solution has X, Y, Z projects with classes arranged in certain fol...
Hello. What is the recommended replacement of ASP.Net server controls in the bright new world of ASP.Net MVC?
In my opinion, one of the best features of ASP.Net is the ability to write server controls (although, admittedly, the event model is horrendous to deal with). If these controls are self-populating, then they can be shared betwee...