The code-organization tag has no wiki summary.
4
votes
2answers
294 views
Practices for organizing JavaScript AMD imports
Our company has been using newer versions of the Dojo framework, which have progressed to an AMD-based loader format. I'm currently trying to find logical ways to separate layer files, taking a module ...
0
votes
0answers
25 views
Organize Web API Controllers by their associated Views, or by the logical type they operate against?
We're building a large Angular SPA that uses ASP.NET Web API on the backend. The application will have a large number of views (100-200). I'm debating whether to organize the Web API such that the ...
0
votes
1answer
240 views
Git structure for java project
I know there are multiple posts on similar problems, so please be kind with me.
I am asking for suggestions I have not thought of and for good advice.
I have a java "project" that is structured in a ...
1
vote
1answer
137 views
How should a GUI application written in WinAPI be structured and organized? [closed]
I've done an extensive amount of GUI programming in Winforms and WPF using C#, and a tiny bit in C++ using MFC. I'm building a personal project using WinAPI mainly to gain a deeper knowledge in ...
0
votes
2answers
216 views
Organizing solution / project structure and classes for Line of Business Application (LOB)
The question how-do-you-organize-your-projects already has a few good answers. I would like to get a better understanding about this suggested structure:
MyApp.Core
MyApp.Model
MyApp.Presenter
...
1
vote
5answers
188 views
Breaking up classes and methods into smaller units
During code reviews a couple devs have recommended I break up my methods into smaller methods.
Their justification was (1) increased readability and (2) the back trace that comes back from production ...
2
votes
3answers
189 views
What is a good way to share internal helpers?
All my projects share the same base library that I have build up over quite some time. It contains utilities and static helper classes to assist them where .NET doesn't exactly offer what I want. ...
0
votes
3answers
110 views
How should I organize a file with many functions in it? [closed]
I am writing a web app using PHP and JQuery. I have a file full of functions to access the database. I have function names like createUser, createRole,getUserByLogin, setSOMETHING...
Is there an ...
5
votes
1answer
111 views
What to focus on when separating a monolithic codebase into separate (NuGet) packages?
I work on a fairly large web application. The main solution containing the web application project has over 100 projects. The average build time of that solution is 2 minutes on a 12 GB quad-core ...
2
votes
3answers
153 views
When to use python function nesting?
I am writing a program that creates backup of directories.
Which of the following approach is better for code organization?
Create separate class for Backup and Zip logic -
class BackupUtil:
...
3
votes
2answers
191 views
Should accessible members of an internal class be internal too?
I'm designing a set of APIs for some applications I'm working on. I want to keep the code style consistent in all the classes I write but I've found that there are a few inconsistencies that I'm ...
0
votes
1answer
512 views
What are the tradeoffs for using 'partial view models'?
I've become aware of an itch due to some non-DRY code pertaining to view model classes in an (ASP.NET) MVC web application and I'm thinking of scratching my itch by organizing code in various 'partial ...
2
votes
0answers
71 views
How to manage success dependency between unit tests [duplicate]
How do you manage the dependency of one unit test on another unit test succeeding?
So, supposed I have a class and this class has say 5 methods. I create like 2 dozen unit tests (test methods) for ...
3
votes
2answers
192 views
TDD workflow for (implementation specific) edge cases
When developing features with TDD, I create a test for each combination of feature and case. So, one test for creating user successfully, one for validation errors, and one for database errors. I ...
2
votes
3answers
437 views
DAL vs BLL functions' return types
Here is how I see the main differences between the DAL and the BLL:
The DAL directly query the database.
The DAL doesn't create new information. It may execute complex sql requests, joining several ...
1
vote
1answer
69 views
When using an ORM should mappings be defined in the code file?
Doctrine offers three ways to define the object mapping properties: in XML, in YAML and as inline docblock annotations in the code. The Doctrine documentation doesn't give any advice on choosing ...
2
votes
4answers
383 views
What is the proper way to store an object with many attributes in Objective-C?
I have an object that I am downloading over HTTP, that has approximately 50 attributes. What is the proper way to store this information in Objective-C? Should I have an NSObject with a property for ...
5
votes
2answers
448 views
Where to put interface in .Net
I have VB.Net project, with a class with a couple of abstract (mustoverride) properties, that I am thinking about moving into an interface.
My question, is structurally how do I do this? Currently ...
5
votes
1answer
187 views
How Do You Organize Your Methods in OO Progamming [duplicate]
Whenever I am programming in an object-oriented language, I am always faced with what order and how to group the methods for an object. Are there any standards for this, or any suggestions?
2
votes
1answer
363 views
Organizing related projects and dependencies for nuget publishing
I've been working on writing .NET bindings for Rollbar, an error and message reporting service, like Airbrake. My library is working nicely and is published in the NuGet gallery.
So now I want to ...
2
votes
1answer
664 views
What are standard directory layouts for storing database scripts in TFS?
I recently took over the maintenance of 10-15 SQL Server databases and to my surprise found out that the team does not store the code scripts anywhere. They currently deploy changes to each ...
2
votes
1answer
280 views
Why do we write our specs in different files from our source?
The D Programming Language supports writing unit tests inline with source. There's a Ruby gem called test_inline that lets you write specs in the same file as your code.
Why is it generally ...
0
votes
1answer
134 views
Exception handling class: static or object-oriented?
I am working in a windows service (using VB.Net) for internal use of my department. When ever a certain type of exception (FooException for now on) is captured, I follow the same logic:
Log the ...
0
votes
1answer
807 views
Big project with many external libraries - source code organisation
I was wondering what is the best way to organize my source code. I was researching on SO and found http://stackoverflow.com/a/1398594/137261 but this source code layout is library specific and doesn't ...
7
votes
2answers
2k views
Should classes, enums and other entities be placed in separate files?
My company's team lead\architect argues that a large-scale project is easier to understand if "entities connected by logic" are placed in one .cs file.
I quote:
"The whole structure of the logic ...
1
vote
1answer
74 views
Need some input on storing stdin, stdout, stderr information for debugging
I am working with a legacy system that is not too bad, but I thought of making some improvements to it, and I wanted to solicit your feedback to help me make good decisions. The platform is Linix ...
2
votes
1answer
429 views
Organizing ASP.Net Single Page Application with Nancy
As a personal project, I'm creating a single page, asp.net web application using Nancy to provide RESTful services to the single page. Due to the complexity of the single page, particularly the ...
2
votes
1answer
2k views
Should I implement BackBone.js into my ASP.NET WebForms applications?
Background
I'm trying to improve my group's current web app development pattern. Our current pattern is something we came up with while trying to rich web apps on top of ASP.NET WebForms (none of us ...
12
votes
6answers
1k views
Using nested public classes to organize constants
I'm working on an application with many constants. At the last code review it came up that the constants are too scattered and should all be organized into a single "master" constants file. The ...
3
votes
4answers
582 views
How to maintain same code fragments on multiple projects [closed]
I am an indie developer working on multiple Android projects. I am having problem with maintaining same functionality on different projects. For example, three of my apps use the same 2 classes; since ...
4
votes
5answers
584 views
How do you name your personal libraries?
I'm pretty bad with naming things.
The only name I can every generically come up with is 'helper'. Say, if I have a header file that contains helping functions for manipulating paths, I tend to put ...
23
votes
9answers
2k views
How do you organize highly customized software?
I'm working on a large software project which is highly customized for various customers arround the world. This means that we have maybe 80% code which is common between the various customers, but ...
9
votes
1answer
4k views
Organizing code for iOS app development
I've been developing an app for the iOS platform, and as I've been going along, I've noticed that I've done a terrible job of keeping my files (.h, .m, .mm) organized. Is there any industry standards ...
3
votes
2answers
268 views
Layout of mathematical views (iOS)
I am trying to figure out the right way to encapsulate graphical information about mathematical objects. It is not simple. For example, a matrix can include square brackets around its entries, or ...
2
votes
4answers
1k views
Splitting code from form operations in C#
I have a large (at least for me - approximately 10k lines) project that is written in C#. I have a treeview object on the left of my form and i have many nodes on my treeview. When i click a node, i ...
-1
votes
1answer
226 views
Javascript Form Validation
When validating a JavaScript form, would it be better to process each input field individually, or, where possible check collectively?
e.g.
validate()
{
noblanks()
fieldOne()
...
6
votes
4answers
365 views
Should large or old Codebases be expected to be easy to navigate?
I'm an Undergraduate Computer Science Student currently on a placement year at a company that produces and supports a large enterprise web application. I'm loving the experience of seeing how software ...
0
votes
1answer
540 views
What are the best-practice / norms to order functions in files or classes? [duplicate]
Possible Duplicate:
How do you normally layout a class's regions?
It often happens that I'm stuck in front of my code editor searching the best place to put a new function.
I've no ...
10
votes
4answers
624 views
Is it good practice to keep the main function separate in its own file?
Is it good practice to have a main.c file that just has the main function in it and no other functions so that all other functions can be interfaced?
If there is no definitive rule, when is it good ...
6
votes
6answers
837 views
Organizing Class Members in Regards to Access Modifier
If we look at typical implementation of a Class, we usually see the private members defined at the beginning and public( mostly functions and Accessors) defined towards the bottom. Now, is this a ...
0
votes
2answers
199 views
JavaScript (jQuery) And CSS Styling
Lets say I am building a jQuery plugin that has a number of non-configurable css attributes it needs to apply to DOM elements the plugin itself creates. Is it consider better practice to apply the ...
1
vote
3answers
550 views
Structuring Visual Studio folders
If I'm doing a website, I end up with folders like "Controllers, Views, Models, Extensions, and Helpers". If I'm doing a DLL library I end up with folders reflecting the namespaces of my classes. If I ...
2
votes
1answer
443 views
How should I organize the Presenters/Views for model view presenter?
We have several hundred ASPX files (could be more than that, into the thousands, I haven't actually counted) that currently use no architecture and have all the logic/data access in code-behind files. ...
2
votes
4answers
290 views
Do more object declarations affect the program?
I am programming in Windows Forms and MySQL.
If I declare this in the program, I can use the connection and command objects in the whole .cs page:
MySqlConnection connection = null;
MySqlCommand ...
3
votes
2answers
1k views
Organizing your Data Access Layer
I am using Entity Framework as my ORM in an ASP.Net application. I have my database already created so ended up generating the entity model from it. What is a good way to organize files/classes in the ...
2
votes
1answer
347 views
What's the best way to organize JavaFX 2.0 code?
In every example I have seen yet almost all of the GUI code is written in the start(Stage stage) method of the main class. Is this the best approach, or is it OK to subclass the Stage class and make ...
2
votes
2answers
1k views
How do you organize an ASP.NET MVC 3 application with potentially hundreds of views but with only a few entry points?
Assumptions:
Minimalist ASP.NET MVC 3 application for sending emails where the view represents the contents of an email.
Over 500+ email types. I would NOT like to have 500+ actions in my controller ...
5
votes
1answer
86 views
To Press Onward or Not?
In the past week I've been meeting and speaking with someone who's interested in finding help on developing a game (built using php and mysql, with a little bit of javascript). I agreed to help out, ...
9
votes
3answers
2k views
Clever PHP Application Organization Structures?
There are a million-and-one file-system structures that go into the myriad of Open Source projects available. Things like modules, language files, domains, third-party libraries, migrations, ...
10
votes
2answers
2k views
How to structure multiple overlapping solutions / projects in .Net?
I recently started out working for a new client with an old legacy codebase in which there are multiple .net solutions, each typically hosts some projects unique to that solution but then "borrows" / ...