CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Jul 2014
    Posts
    12

    Unhappy How to Learn the Parts of Programming that Aren't Programming.

    Yes, I am aware that the title of this thread could use some work, but truth be told, the question I have is fairly broad and difficult to narrow down. In fact, it is likely better expressed as a series of questions. The reason I post it here is because the language I am currently using is C#, and I'm sure it's at least possible that the solution could very well be specific to it and/or .NET in general.

    Anyway, I have been working in PHP for the past year, and recently I started learning C#. I have learned a lot and am ready to start a project to continue my learning, but I find that I don't know some basic things that have nothing to do with coding that maybe someone here can help steer me in the right direction.

    Working with web applications, I understand for the most part what all file types I need to complete a given project. An example would include .css files for formatting, php files for form processing and dynamic html, js files for javascrpt, and a hook into a data source for those sorts of things. All syntax aside, I have no idea what kind of components are used for what when it comes to this sort of development.

    Now I have seen examples of reading information from a text file, and I know that these applications can hook into databases, but how are these sorts of needs measured and planned for?
    - Is having something like a json file the way to go for specific needs and not others, or is it completely up to me?
    - Does using a database cause unnecessary performance increases that are solved by reading from a file?
    - What if that file needs to be kept safe from the user?

    I am using data as an example, but in truth this is just an item of convenience. What I am really looking for is a site/article/course that deals with the non-programming aspects of development like my data example, because any that I have read generally assume some knowledge or future exposure that will shed light on this. I can grasp the syntax, but this is so foreign to me that I am having difficulty even finding a place to look. Also, I am teaching myself and do not do this as a profession, so I have no colleagues to ask, nor do I have a project to work on that guides me to these answers.

    Please help.

    -D

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to Learn the Parts of Programming that Aren't Programming.

    If you plan to build a web site with C#, check out creating a new web site using MVC5 and Razor.

    As far as reading data from a file, you can do that for read-only files that rarely get updated. But for anything more substantial (in my opinion), you are better off going with a database.

    What databases do well is handle concurrency. If you want to try to replicate that using files, you'll need to manually implement thread-safety and synchronize access to the files (because web requests come in on different threads and if you don't synchronize you can get file corruption).

  3. #3
    Join Date
    Jul 2014
    Posts
    12

    Re: How to Learn the Parts of Programming that Aren't Programming.

    Thank you for your answer.

    I am not planning a web site, though the project in question will likely need a companion in that form. Does your answer stand for non web-based projects? I attribute the lack of clarity with the fact that the only interactions that many online guides and courses address generally include reading from a file, but they mention database access as a sort of afterthought.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to Learn the Parts of Programming that Aren't Programming.

    Quote Originally Posted by decimer View Post
    Thank you for your answer.

    I am not planning a web site, though the project in question will likely need a companion in that form. Does your answer stand for non web-based projects? I attribute the lack of clarity with the fact that the only interactions that many online guides and courses address generally include reading from a file, but they mention database access as a sort of afterthought.
    If you are building C# apps on Windows, then it depends. For read-only data, you can use the app.config file (and the XmlSerializer to read the data). For read-write, user or app setting data, check out the Settings class (look in the Settings tab of the Project properties to define the settings).

    You also can read or write to any files, but you have to be careful where you put these files, because some of the system folders are locked down and you can't write to them while the program is running (unless the program has elevated permissions).

    For more complex operations, a local database is still a good idea.

  5. #5
    Join Date
    Jul 2014
    Posts
    12

    Re: How to Learn the Parts of Programming that Aren't Programming.

    Thank you.

    I will look into the items you suggested, and hopefully that will send me on a nice little voyage of discovery.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured