code-organization

how to organize code for different "mobile device interfaces" and "desktop interfaces"

I am planning for a web application. I am using the PHP framework Kohana with Smarty. My web application will also have mobile device interface. Now, there will be lot of common and lot of separate code for the two interfaces. How should I organize the the code so that: There is no duplication of code. Unnecessary code does not get lo...

Organize stored procedures, views, functions etc with sql management studio.

Hi I'm using Microsoft SQL Server Management Studio to work with a database. I'm only a .Net developer with limited experience in managing sql server, I'm far from a real DBA. In next few days, the number of stored procedures are going to increase very much. Also more views and functions will be created. Are there any way to organize ...

OK to put my public interfaces into their own package

Would it be OK to put my public interfaces into their own package (for my organisation only). for example com.example.myprogram - contains all normal code com.example.myprogram.public - contains public accessible interfaces com.example.myprogram.abstract - contains abstract classes Is this a good or a bad thing to do, are there any...

Where do I put all these function-like #defines, in C?

I'm working with an embedded system, and I'm ending up with a ton of HW-interfacing #define functions. I want to put all of these into a separate file (for OOP-ness), but I don't know the best way to #include that. Do I just put them all into a .c file, then include that? Seems silly to put these in a .h file. ...

How would you organize a large complex web application (see basic example)?

Just to keep things interesting and close my final open question, the solution that implements the below functionality in a nicely organized manner with a decent architecture gets a good bounty. The full code is on jsfiddle, and feel free to ask any questions :) How do you usually organize complex web applications that are extremely r...

How many repositories should I use to maintain my scripts under version control?

I mainly code small programs for myself, but recently, I've been starting to code for my peers on my team. To that end, I've started using a Mercurial repository to maintain my code in some form of version control (specifically, Tortoise-Hg on Windows). I have many small scripts, each in their own directory, all under one repository. How...

Is there a suggested solution structure for ASP.NET MVC Production Apps

In general, I don't like to keep code (BaseClasses or DataAccess Code) in the App_Code directory of an ASP.NET Site. I'll usually pull this stuff out into a MySite.BusinessLogic & MySite.DataAccess DLL's respectively. I'm wondering should I be doing the same for ASP.NET MVC. Would it be better to Organise the solution something along t...

Organizing code, logical layout of segmented files

I have known enough about programming to get me in trouble for about 10 years now. I have no formal education, though I've read many books on the subject for various languages. The language I am primarily focused on now would be PHP, at least for the scale of things I am doing now. I have used some OOP classes for a while, but never to...

asp.net mvc2 - controller for master page and code organization

I've just finished my first ASP.NET MVC (2) CMS. Next step is to build website that will show data from CMS's database. This is website design: #1 (Red box) - displays article categories. ViewModel: public class CategoriesDisplay { public CategoriesDisplay() { } public int CategoryID { set; get; } public...

Code Organization Connundrum: Web Project With Multiple Supporting DLLs?

Hi. I am trying to get a handle on the best practice for code organization within my project. I have looked around on the internet for good examples and, so far, I have seen examples of a web project with one or multiple supporting class libraries that it references or a web project with sub-folders that follow its namespace conven...

where to store helper functions?

i've got a lot of functions i create or copy from the web. i wonder if i should store them in a file that i just include into the script or should i store each function as a static method in a class. eg. i've got a getCurrentFolder() and a isFilePhp() function. should they be stored in a file as they are or each in a class: Folder::g...

how to organize javascripts using rails and jquery

Hi, i'm working in a big and rich rails web application using tons of javascript. I would like to know if anybody has a tip to organize the javascripts. Today i'm generating a new file named controller.js and adding it to my views using content_for. The problem is, some files are becoming big and sometimes, i need a function from one co...

What are some good techniques to organize JS includes for a large website?

Should each page have its own .js, with reusable features (live search, drop-down menus) being included in some kind of all.js for each page? Not sure what the best way to structure this is. Thanks for your input! ...

KO3: How to deal with stylesheets and scriptfiles

I'm using Kohana 3 and it's template controller. My main site template controller currently looks something like this: <?php defined('SYSPATH') or die('No direct script access.'); abstract class Controller_SiteTemplate extends Controller_Template { public function before() { parent::before(); // Initialize defa...

Developing for mobile devices and desktop

Hi, I'm starting a new project. It will run on devices running Windows CE, Windows Mobile 6 and will also have a desktop version. The software will connect to some equipments through the serial port, using it's own protocol. Basically it will: connect to the equipment send and receive info read and write binary files These tasks wil...

Large Scale VHDL modularization techniques

I'm thinking about implimenting a 16 bit CPU in VHDL. A simplish CPU. ADD, MULS, NEG, BitShift, JUMP, Relitive Jump, BREQ, Relitive BREQ, i don't know somethign along these lines> Probably all only working with 16bit operands. I might even cut it down and use only a single operand and a accumulator. With Some status regitsters, Carry, Ze...

Guidelines for solution source code organisation(OO/DDD)

I'm starting on my first business project (.NET) and am trying to follow DDD principles. Are there any guidelines or common patterns for orgaining source code and namespaces? For example, do your domain objects go in a namespace MyProject.Domain or whatever? Would you separate the concrete implementations and the interfaces? In differen...

NetBeans shortcut key for collapsing/expanding a method

JAVA - NETBEANS This is an IDE question I am always working with collapsed methods, because I want to be able to see my methods all together. This is a little time consuming because I have to use the mouse to scroll up to the declaration of the method and click on the - (minus) icon. And then respectively go to the method I want to wor...

Nested namespaces, correct static library design issues

Hello all, I'm currently in the process of developing a fairly large static library which will be used by some tools when it's finished. Now since this project is somewhat larger than anything i've been involved in so far, I realized its time to think of a good structure for the project. Using namespaces is one of those logical steps. ...

Opinions sought on the best way to organise classes in PHP

I am pretty much set on using the Java package naming convention of com.website.app.whatever but am unsure about the best way of doing this in PHP. Option 1: Create a directory structure com/ mysite/ myapp/ encryption/ PublicKeyGenerator.class.php Cip...