Unlinked .cs files impact on application performance - c#-2.0

I have a very simple question. Lets suppose there is C# project name Game and in this project there are two .cs files, PacMan.cs and Snake.cs. I copied both these files and pasted them in the same folder where Snake.cs and PacMan.cs resides. If I build the project, does unlinked files present in the folder have any effect in application performance? I am confident that compiler gonna ignore unlinked files and there wouldn't be any performance impact, but I am not 100% sure. Can anybody comment on that?

The files aren't included in the compile, so the resulting program has no knowledge of them and therefore performance won't be impacted.

Related

How can I arrange my project files according to their folder structure in Xcode

I am working on a MASSIVE project with about 10 thousand files in it. The files are nicely arranged in Xcode's directory system but not so on the disk. Is there a tool that I could use that would make the folder structure on my disk represent the folder structure in Xcode?
Personally, I know two ways to do it:
Do it manually (rearrange your folder first, and then drag and drop your directories in xcode). That will do the job.
Use an external library, I suggest you synx. It does the job well
I don't know why you want to do that, but I don't think it's really important if your folder isn't ordering with your xcodeproj since you will always open it with xcode. Just separate assets is enough, isn't it?

Legacy iOS app didn't use folder structure for it's files at all. How to refactor without individually telling each file where it now lives?

I have inherited an iOS app where all the class files were dumped into the root directory. In the project there are groups but the files themselves are not in folders.
How do I go about refactoring and redoing the project so I can create folders and put the files into them, without having to manually tell each file where it now lives in the xcode sidebar.
I'm going to assume there's some sort of 'auto-scan for files' feature but I'm worried that this could end up causing all sorts of compilation issues.
If there's a safe way to do this appreciate the help!

XCode Project: should we put source code in separate folders for meaningful purpose

I'm a Java developer, and a new comer to ios development. In learning phrase, I try to download some sample projects (include from small one to medium one) for reading how often they do work in an ios project. As I see, often, they put all source file into one folder (include header file, source file, .storyboard file, xib file ...) and I see this will make your project become messy.
So, I come here to ask a question that. Should we put source code in separate folders base on their usage, to make project less messy, right ? For example, all custom core data model class files should put into Model folder. All View file (such as .storyboard, .xib file ...) should put into View folder. All Controller file should put into Controller folder ...
If you often do this, please tell me your experience, how you folder your code ? And does XCode support virtual folders (that in XCode IDE you see source code in folders, but in hard drive, they're just same).
Thanks :)
Xcode differs from Eclipse and Android Studio in maintaining a separate project-level division of resources into folders that need have no correlation whatsoever to the file system. Given that the lack of namespaces usually leads people to be very relaxed about what formally is and is not a 'package', it's a real wild west out there.
I tend to keep things organised by mental package — model, view, controller at the top level, e.g. maybe web services, persistent store under model, etc. But even then command+shift+O and type a symbol or class name is by far the easiest way to navigate a project.
Others might argue that keeping things flat is better because then you don't have to keep the file system layout in sync manually and open-by-symbol plus the class browser obviate the need for stringent organisation, presenting a hierarchical relationship without the need to get either the disk or the workspace into agreement.
You first have to make the difference between folders and groups. Folders are used to organize contents on your filesystem whereas groups are used to organize contents within your Xcode project. You can think of groups as virtual folders. I personally prefer to keep a flat structure on the filesystem and organize everything using groups. This way is slightly more straight forward to include header files and it doesn't force you to maintain both the filesystem structure and the xcode structure.
In you Project you ca do any GROUPS you want to make simple and clean your project, like my screen:
Is easy and simple and you have two ways:
1) in your project right click in to right column then select NewGroup
2) drag and drop your folder in to a column to create a folder reference:
this only if you want integrate in your project a root with inside files PHP, HTML, ASP and more, but attention because after you distribute your app, if a people open .app file they found inside your REFERENCE FOLDER with all your clear code.
I think this is it ;)
Folders makes your code and its management easily, like we have packages in Java that we use to accumulate some common classes and its supporting class files.
In the same way we can use folders to manage our classes in XCode.
However its not necessary, varies from developer to developer as well as the complexity of code.
Happy Coding. :)
The approach you are discussing about is correct.
As far as folder in code is considered. If you create folder within Xcode and dividing the codes based on folders. Than all the classes will exist together on hard disk. But if you create folders within the project using finder and than adding the folder than codes will be saved to their respective folders.
Hope it will help you. Happy coding :)

How to add large number of static files to MonoTouch bundle?

I have (quite a bit of) static files that I need to deploy with my application that is built on top of a legacy .NET library. These include several XML and config files, and a read-only database in the 10's of Megabytes.
Most forums I have seen indicate that the best way to accomplish this is to reference the needed files in a project, and set them to Content and "Copy to Output Directory".
I have two issues/questions dealing with this:
Adding these files, and setting them to "Content" seems to not only copy the files over, but embed them into the .dll as well. In other words, I have 40 MB worth of files, and a 40MB dll (this project's only goal is to import these files, there is no substantial code).
How can I prevent this extremely large dll from being made?
Is there an alternative way to get files into the App bundle? I would love to use a custom build command, and although I can copy files into the target directory ${AppDirectory}, but this does not result in these files ending up in the app bundle. Is this approach possible?
Any help is appreciated in advance.
You need to include your files from the main .exe project. You do this by using MonoDevelop's Build Action to Content on each file. They should be copied to the .app without being included inside an .dll (or the .exe).
An alternative (for development) is to use iTunes sharing to copy once your files to your device. This allows you much faster deployment times while developing.
Of course you can't submit such build to the app store (unless the files are not required to make the application work, unlikely). What I do (for my nearly 80MB read-only database) is to use this hack (loading from /Documents) inside #if DEBUG. The release build load the files from the normal location.
I have not automated the process (still debugging the app ;-) but it should be possible to script this so modifying the project options (for each file) is not required when switching from Debug and Release builds.

Inter-project dependencies

I'm doing some Delphi (2010) work this summer, and I've stumbled upon this problem:
My project consists of reusable backend library and a bunch of GUIs that tap into its interface. In this circumstances I've decided to make the backend and GUIs separate projects within single project group (I hope my train of thought is correct). The problem is, how can I include units from the backend in a GUI project?
I've tried to modify Project Options > Directories and Conditionals but compiler still complains about being unable to find proper .dcu's.
Any ideas? Your help will be appreciated.
In D2010, the Directories and Conditionals in the project option refers to (and is specific for?) the resource compiler.
I guess what you are looking for is the Project Options->Delphi Compiler->Search Path
Search where the compiler is generating the DCU files. (2)
In project options you must add the source directory on you have de PAS files (1) or the directory where compiler generate de DCU files.
(1) In the "Search path" edit.
(2) This directory is the "Unit Output Directory" edit.
Regards

Resources