code-organization

Best way to organize the files in my project

别来无恙 提交于 2019-12-03 09:01:13
What is the best way to organize the files in your project? For example do you put all user controls in a separate folder or do you place them in a sub folder? Do you have business logic folder? A helper classes folder? I used to organize my projects like this: Project/User Controls/Module Name/ Project/Classes/Module Name/ Now I am learning more towards something like this: Project/Module Name/User Controls/ Project/Module Name/Classes/ What is the best way? Especially if the project gets really big? What type of folder structure should exist? First the purpose of folder separation is to be

How do you organize C# code in to files?

纵饮孤独 提交于 2019-12-03 09:01:10
问题 In C#, the questions of what types to create, what members they should have, and what namespaces should hold them, are questions of OO design. They are not the questions I'm interested in here. Instead, I want to ask how you store these in disk artifacts. Here are some example rules: Put all of an assembly's types in a single source file. One friend who did this said "files are an archiac code organization tool; today I use classview and Collapse to Definitions to browse my code". Put all

best articles about organizing code files in C [closed]

左心房为你撑大大i 提交于 2019-12-03 06:50:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Can you recommend me what should I read/learn in order to make a well organized code in C? One of the things I want to learn is the principles of splitting project in .h and .c files, what goes where and why, variable naming, when to use global variables ... I am interested in books and articles that deal with

Haskell module naming conventions

旧巷老猫 提交于 2019-12-03 06:23:08
问题 How should I name my Haskell modules for a program, not a library , and organize them in a hierarchy ? I'm making a ray tracer called Luminosity. First I had these modules: Vector Colour Intersect Trace Render Parse Export Each module was fine on it's own, but I felt like this lacked organization. First, I put every module under Luminosity , so for example Vector was now Luminosity.Vector (I assume this is standard for a haskell program?). Then I thought: Vector and Colour are independent and

Organizing GUI code

蓝咒 提交于 2019-12-03 06:13:54
My question has two parts: Does anyone have any tips or references to some documentation on the web about how to write GUI code that is easy to read, write, and maintain? Example. I find that the more extensive my GUI forms become, I end up with a long list of fairly short event handler methods. If I try to add any private helper methods, they just get lost in the shuffle, and I constantly have to scroll around the page to follow a single line of thought. How can I easily manage settings across the application? Example. If the user selects a new item in a drop-down list, I might need to enable

How do you organize code in embedded projects?

℡╲_俬逩灬. 提交于 2019-12-03 05:58:39
问题 Highly embedded (limited code and ram size) projects pose unique challenges for code organization. I have seen quite a few projects with no organization at all. (Mostly by hardware engineers who, in my experience are not typically concerned with non-functional aspects of code.) However, I have been trying to organize my code accordingly: hardware specific (drivers, initialization) application specific (not likely to be reused) reusable, hardware independent For each module I try to keep the

How to organise large code files?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 03:21:54
I am increasingly aware that my code in any single file can often span hundreds of lines quite easily and although I know the implementation might be sound, it still feels messy and unorganised. I understand that there are situations where a lot of code is neccessary, but whats the best way to organise it all? I've thought about separating variables from methods, private s from public s and internals but I don't want to because I can't help thinking that the components of ONE class belong in ONE file. This whole thing is compounded when I'm working with the codebehind of a WPF window, which

Spark code organization and best practices [closed]

不羁的心 提交于 2019-12-03 00:04:44
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . So, having spend many years in an object oriented world with code reuse, design patterns and best practices always taken into account, I find myself struggling somewhat with code organization and code reuse in world of Spark. If I try to write code in a reusable way, it nearly

How do you organize C# code in to files?

ぃ、小莉子 提交于 2019-12-02 23:06:27
In C#, the questions of what types to create, what members they should have, and what namespaces should hold them, are questions of OO design. They are not the questions I'm interested in here. Instead, I want to ask how you store these in disk artifacts. Here are some example rules: Put all of an assembly's types in a single source file. One friend who did this said "files are an archiac code organization tool; today I use classview and Collapse to Definitions to browse my code". Put all your code in one assembly. Makes deployment & versioning simpler. Directory structure reflects namespace

best articles about organizing code files in C [closed]

拜拜、爱过 提交于 2019-12-02 19:19:58
Can you recommend me what should I read/learn in order to make a well organized code in C? One of the things I want to learn is the principles of splitting project in .h and .c files, what goes where and why, variable naming, when to use global variables ... I am interested in books and articles that deal with this specific problem. A good book that covers a lot of this (for both C and C++) is Large Scale C++ Software Design, by John Lakos : Also, a good rule of thumb to remember is "Never do anything that allocates memory in a header file" Regarding the files layout there are not too many