As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I am wondering what directory structure are commonly used in development projects. I mean with the idea of facilitating builds, deploys release, and etc.
I recently used a Maven structure for a java project, but I am not sure it's the best structure for a non-maven driven project.
So, I have two questions: When you guys start new projects, what structure you use? And: What if you need to integrate two different languages, like for example java classes into a PHP application; PHP files are source files, web files, you you use a /src, /classes, webapps/php ? What are your choices in such scenarios.
As a note: I am wondering also what are you choices for directories names. I like the 3-letters names (src, lib, bin, web, img, css, xml, cfg) but what are your opinions about descriptive names like libraris, sources or htdocs/public_html ?
After a couple years working with different structures I recently found a structure that hols most variations for me:
/project_name (everything goes here)
/web (htdocs)
/img
/css
/app (usually some framework or sensitive code)
/lib (externa libs)
/vendor_1
/vendor_2
/tmp
/cache
/sql (sql scripts usually with maybe diagrams)
/scripts
/doc (usually an empty directory)
Although we don't use Maven, we use the Maven directory structure.
We've found that it accurately reflects the concepts we need (e.g. separation of deployment code from test code, code from data, installers from code). Also we figure that if someday we switched to Maven, most of our process would remain the same.
I just found a interesting document about Directory structures on Zend website:
http://framework.zend.com/wiki/display/ZFDEV/Choosing+Your+Application%27s+Directory+Layout
A 2011 update:
http://java.sun.com/blueprints/code/projectconventions.html
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Is the use of namespaces as well as folders to organize code overkill?
Example:
Folder Structure:
Engine (Root)
--Audio
--Exceptions
--Game
--GFX
--Input
--Math
--Messages
--Physics
--Time
--[global headers]
All classes are contained in a [root]:: namespace to prevent collisions with std:: and third party code. The Math folder contains a header of some helper (free) functions contained in the [root]::Math:: namespace and Audio has some more helper (free) functions in the [root]::AudioHandler:: namespace.
Should I put the classes in each folder into a similarly describing namespace? (i.e. classes in the Physics folder would also be in the [root]::Physics:: namespace.)
Namespaces organise the logical interfaces, directories the "physical" files.
The more code within a single namespace, the more important it is that it's relatively stable and well-coordinated; if identifiers are volatile and uncoordinated you'll likely see conflicts as changes are merged. Based on your experience of or feel for such conflicts, you can choose your namespaces.
std:: is an obvious example of a very stable and well coordinated namespace, which means a lot of stuff can be successfully bundled into it. If you're working on a one-man project - all the way from libraries through application - you're more likely to cope with fewer namespaces too.
On the other hand if you have several global teams working independently - changing/adding identifiers constantly - then it's good to separate the code into namespaces. Further, if you have regular experiences that the obvious and desirable identifier to use in one system is already in use in another - that suggests namespaces too.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I would like a pointer to the proper way to name a project when invoking
lein new <projectname>
My question is related to a question I've asked recently.
Specifically, a lot of projects I have seen use dashes, like clojure-csv.
Yet, I am having trouble getting a project to work on Windows.
So my specific question is is there a way to create the project when invoking lein new and what other adjustments in project.clj and core.clj should I expect to make when creating a Clojure project on Windows (in my case Windows 7) using lein?
You can take inspiration form search into clojars.org like https://clojars.org/search?q=the.
The pattern seems to be namespace/name-with-dashes or name-with-dashes. For instance :
cool-stuff
stackoverflow/cool-stuff
com.stackoverflow/cool-stuff
The recommended way to name namespaces is with a reverse domain like com.stackoverflow.subsection.
There is an "official"* ban on further projects who's name is a pun on the word Clojure... Please, this has to stop ;-) Specifically project names of the form verb+jure
so if your project does foo please do not name it foojure
existing projects like compojure (compose+jure) are cool because they predate this collective intention.
*not in any way official ;-)
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
And, what has your experience been? Do you think that Maven has been well suited to your project, and how would you advise others on following your path?
Thanks in advance!
CERN seems to be using it in combination with Make:
http://accelconf.web.cern.ch/accelconf/icalepcs2011/papers/wepks026.pdf
I have not used Maven for any of my projects but some of my colleagues used for java projects. Are you looking for ant special features of it ? if its plain vanilla build then stick with Makefiles. You can also look at http://www.scons.org/
Why do you want to use maven for a C/C++ project?
Maven is very good but require you a very deep knowledge, and it is strongly Java-oriented.
I think Makefiles are good also for big C++ project.
I will suggest automake+autoconf for a slight better way of managing Makefile creation.
Take also a look to big project like the OpenOffice sources, for getting inspired.
I'm using CMake under Maven: http://code.google.com/p/cmake-maven-project/
I find CMake much easier to use because it generates full-fledged project files. You can then open those project files and run the debugger, profiler, etc.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am starting development on a medium-scale C++ project that has to work with a Microsoft SQL Server database. I have done database work before using .NET technologies but I don't find using a .NET approach to be appropriate this time. I would like to get some feedback concerning the various free (as in GPL, LGPL, Boost) C/C++ SQL libraries available. I found MySQL++ and SOCI to be pretty interesting and I would like to know which one you guys prefer and why.
Also, although this project will primarily be run on Windows workstations, I prefer developing under Linux so cross-platform compatibility is an advantage.
I can highly recommend OTL.
Not only does it support all major DBs, it's also very STL-ish and is generally written according to to proper C++ methodology (IMO). It worked for me just fine on VC8 (I used the MySQL ODBC connector).
Moreover, it's a one-header library. So there's no linkage issues or anything. Just include the header and you're done. You're 3 lines of code away from querying a MySQL table.
I've used it over the past few months, and also had a good experience communicating with its developer, asking questions, etc.
I recommend SQLAPI++. It's shareware so you can try it for free and the support is excellent. Works for Windows and Linux.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've decided to add auto-update functionality to one of my applications and was looking for any existing solutions that compare the current running version with the latest version that is then downloaded from the web.
I know Sparkle on Mac OSX which is very nice and powerful, but was wondering whether there is something similar for Win32/MFC?
I just stumpled accross WinSparkle which is an early stage but looks very promising.
I found two more projects aimed at solving this: http://sevenupdate.sourceforge.net/ and Google's Omaha but it's not clear either of them has any external users yet, so this question is apparently still open. I too am looking for a solution....
I've never used it, but WiX provides ClickThrough. Might be worth a look.
There is open source project WIPT inspired by APT of Debian Linux. However, the project seems to be abandoned.
I assume you already know about ClickOnce? I wasn't sure it was compatible with MFC, but then I found this article, so if that's the question you're asking, ClickOnce would be something to try.
AbstractSpoon uses "Software Update Wizard" from here for their awesome ToDoList MFC app.
Another .NET one: SparkleDotNet
In general no, windows maps things like DLLs (either your own or MFC) in such a way that you can't replace a running program.
The msi installer checks the VERSIONINFO and doesn't overwrite installed files that have the same (or newer version) but you would have to quit the runnign instance.