Tag Info

Hot answers tagged

47

When designing a project and laying out the architecture I start from two directions. First I look at the project being designed and determine what the buisness problems is that needs to be solved. I look at the people who will be using it and start with a crude UI design. At this point I am ignoring the data and just looking at what the users are asking ...


29

I like dividing my projects into layers That way it's easier to manage cyclic dependencies. I can guarantee that no project is importing the View project (layer) by mistake, for example. I also tend to break my layers in sub-layers. So all my solutions have a list of projects like this: Product.Core Product.Model Product.Presenter Product.Persistence ...


15

There are a couple of flaws in your Team Lead's argument: Well-designed classes and enums are intended to be used anywhere in your project, not just where they may make sense logically. Classes and enums that are properly documented with XML comments are very self-describing, by merely hovering over the item referencing it. You can always get to a class or ...


13

Organizing Projects I typically try to divide up my projects by namespace, like you say. Each tier of an application, or component is its own project. When it comes to how I decide how to break my solution up into projects, I focus on reusability and dependencies of those projects. I think about how other members of my team will be using the project, and ...


13

Large code bases aren't designed, they evolve. A lot of things that don't make sense when looking at a current snapshot, make perfect sense when you take history into account. And I don't just mean the individual history of the code base, I also mean the history of software engineering practices in general. Unit testing pretty much always existed to some ...


11

An Assembly is the unit of deployment for a .NET application; therefore you should consider matching the cut of your assemblies with your deployment architecture. Assemblies are also useful when you need separate version control on some code. For example, when you have common interfaces that would benefit from independent version control, you should ...


11

Separate the shared code off into a library, and include the library in the projects. As an Android developer, you're presumably using Java. Consider using a dependency management tool like Maven or Ivy. A side effect is that this will help maintain separation of concerns by enforcing modularity. The cost is that it may take some work to separate; the ...


10

Ideally, all work which can be thought of as part of re-usable code, should be created in the form of library. The balance work, is application which should be separate where main() will reside. But main() alone doesn't have to sit in isolation. Functions like parse_arguments(argc,argv) should be along with main rather then separate.


9

One company I've worked for had the same problem, and the approach to tackle the problem was this: A common framework for all new projects was created; this includes all stuff that has to be the same in every project. E.g. form generating tools, export to Excel, logging. Effort was taken to make sure that this common framework is only improved (when a new ...


8

I have found myself responsible for software development best practice amongst groups of MATLAB users on more than one occasion. As Zellus correctly points out, MATLAB users are not normally software engineers, but rather technical specialists from some other discipline, be it finance, mathematics, science or engineering. These technical specialists are ...


8

While the Maven Standard Directory Layout kind of specific to Java, but it may serve as a good basis for other types of projects as well. Here is the basic structure (you could replace the 'java' directories with 'php','cpp', etc): src/main/java Application/Library sources src/main/resources Application/Library resources src/main/filters ...


8

You are right. Your suggestion allows a programmer to import static Constants.BankAccount.* and eliminate countless repetitions of 'BANKACCOUNT_'. Concatenation is a poor substitute for actual scoping. That said, I don't hold out a lot of hope for you to change the team culture. They have a notion of proper practices, and aren't likely to change even if ...


7

Yes. And also assemblies. I'd separate by layers, then components. Yes. There are different approaches to this, but I'd have an IDatabaseService (abstracting the various manners in which the database is called -- this can almost be a direct mapping of the ExecuteScalar/ExecuteNonQuery/ExecuteReader), and then various data access classes that partition by ...


7

I have never been a fan of including existing projects that belong to other solutions. There are too many variables where making an edit to that project for 1 solution completely breaks something in another solution. Then by fixing that problem you end up breaking the original solution. Lather, rinse, repeat. When this kind of dependency leaks into multiple ...


7

GUI classes can quickly grow into a ball of mud if they're not managed carefully. Simple refactoring will do the trick. Some tips: Push everything that's not directly related to the GUI into separate classes. Refactor as much of the remaining code as possible out of the event handlers into their own methods. Use #regions to separate the event handlers ...


7

There is no industry standard as such. You could look into sample Apple Source Projects to see how they do it.. You could however, try organizing your files into Groups & associate each group to a folder.. Organize all Controllers in One Group with Subgroup for each usecase. Put all views in One Group and subgroup for each usecase. Organize All ...


6

I can't really give you much advice related to webprojects, but here's how I structure my tree in a programming project (mainly from a C/C++ perspective): / src — Source files written by myself ext — Contains third-party libraries libname-1.2.8 include — Headers lib — Compiled lib files Donwload.txt — Contains link to ...


6

This doesn't answer your actual question, but may be of help. Consider cross platform tools There are layers such as PhoneGap, that would allow you develop apps accross multiple platforms in one language. Also, a cross platform language, such as haXe might be of interest (you can use the C++ backend for native apps, and the JS backend for web and mobile ...


6

It sounds like the fundamental problem is not just code repository maintenance, but a lack of suitable architecture. What is the core/essence of the system, that will always be shared by all systems? What enhancements/deviations are required by each customer? A framework or standard library encompasses the former, while the latter would be implemented as ...


6

Version control. Git. Git Submodules. Put your projects under version control, using a dvcs like git or mercurial etc. Put the shared code in a submodule in git. Use the submodule in the projects that need it. When you update the submodule, can pull the changes to other projects with a single command.


6

I don't agree with either of the two proposals. Costants whould be in their pertinent classes, not in an all-constant class in either of the two forms proposed. There shouldn't be constants-only classes/interfaces. There should exist a class CreditCard (not an internal class). This class/interface has methods relative to credits cards as well as the ...


5

Our coding standard requires that main() is in main.c. Other methods in main.c tend to be high level error handlers and helper functions for main (refer @Dipan answer "parse_arguments", as well as things like "display_help" etc. A good rule to go by is when a funcion starts to do more than support the running application and start doing business logic, ...


4

I've been using TiddlyWiki for a while now to organize random notes. It's portable, self-contained and sort of blog-like. an open-source single page application wiki. A single HTML file contains CSS, JavaScript, and the content. The content is divided into a series of components, or Tiddlers. A user is encouraged to read a TiddlyWiki by following links ...


4

For .NET, there's an app called Tree Surgeon that lays out a dev tree for .NET projects. It's kinda dated and I'm not sure how much of a standard it is, but it's an interesting starting point. For my own projects outside of .NET, I tend to set up a folder for source, a folder for tests, and a folder for third-party libs that I depend on. There are often ...


4

Get to know the people behind the project, participate on the project's mail-list. There are usually a number of bugs reserved for people getting to know he project (these easy-to-fix bugs are usually called bitesized bugs)just search for them on the issue tracker. Contributing to the documentation is also a good way to start and it will give you a better ...


4

MATLAB is often used by people not defining themselves as 'Software Engineers'. In consequence they neglect most recommended practices established in the field of 'Software Engineering'. Getting everybody on the 'Software Engineering' train is a matter of soft skills and power. Without the support of the management, granting money and time for training, as ...


4

The first thing you need is a version control system - to make sure code is backed up, to help figuring out where a bug came from, and for people to know where to look when they don't want to re-implement something they know has been done by the group. There should be a /common folder for tools and utility that are generally useful, as well as an /extern ...


4

When I write code in .NET, there is a clear tendency to have clusters of related functionality. Each of which may have some sub-sets of the same. I like to break out the main groups physically - one of these per VS project. I then further subdivide logically using assemblies. Following this pattern, one of my current projects looks like this: Wadmt ...


4

Here are some rules that are almost always correct: You should never reuse a variable for two different purposes. The case when you need to, is a very specific one, and when you see it, you will know it (the flyweight pattern). You should keep your methods very short. The code you've shown can be logically contained in 3-5 methods at least. You should ...


4

I worked for many years on a Pension Administration application which had similar issues. Pension plans are vastly different between companies, and require highly specialized knowledge for implementing calculation logic and reports and also very different data design. I can only give a brief description of part of the architecture, but maybe it will give ...



Only top voted, non community-wiki answers of a minimum length are eligible