Results 1 to 16 of 16

Thread: [RESOLVED] Solution Explorer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Resolved [RESOLVED] Solution Explorer

    Hello everyone. I am a new user in this forum, and I've begun studying VB.NET 2019. I have a large application in my mind, which i want to break it into several projects.
    For example for the X company solution there will be a project that keeps record the company's structure, employee information, employee departments as well as login mechanism, user rights. Other projects will be assigned to each department according to its duties and job and will be included to the solution.
    So, If is place these projects in the same solution, is it possible for these projects to integrate each other? For example what about if i want to pass the login user information from the login project, to his department work interface project and so on? And if this can be done through the RDMS, how about the scope of each project variables? Is there any way variables of X project to be accesible from Y project?


    Thank you in advance.

  2. #2
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Re: Solution Explorer

    Hi Niktsol,

    This sounds as though you wish to make a suit of projects which can communicate with each other ?

    This being so, the answer is yes, it's a simple matter of storing your data somewhere accessible to them all, for example, text files or even in the registry.

    poppa
    Along with the sunshine there has to be a little rain sometime.

  3. #3
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Solution Explorer

    I wrote quite extensive comment, but better to write something suitable for this case: create monolith application for single department and then try to think how to structure the project and split into libraries. If you use subdirectories for different modules and separate UI from backend code (database access and most of app logic) then it will be easy.

    Visual Studio has different type of projects to create so you can initially start with Blank solution. Inside the solution you can add solution folders which are virtual one and are not created in the file system. You can add new (or existing) project inside each solution folder. With proper virtual and file system structure you can get really good results. But first start with monolith if you haven't done this before.

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Solution Explorer

    It really depends on what you want to do.
    Building an company structure project can go a lot of ways. It can also depend on the size of the company, the databases you have available, the servers the employees PC power etc etc.
    As I've worked with several companies in the past , we usually broke down the projects. For example, Marketing department, Accounting, Sales , IT etc.
    Sometimes communicating with each other branches is a real pain, for example the Accounting would always have an intermediate cube for communication with other departments.
    But, as I see from your request, I suspect that you only need employee basics. If that is the case then I would suggest a Web Application with an intermediate layer of web services.
    If that is something that you haven't done before, then it is preferable, at least for me, to have the common data stored in a main database and users can select the data from there. But here you might need to build your app and db so that 2 users from different departments cannot change the data at the same time. There are mechanisms for that but my suggestion is first to break down you company layers, for example, accounting needs, IT needs, Sales needs etc. Then find the commons between them and then post back here with more specific requests. I tried to help in a general idea but this is to broad to say, do this or do that. You must compact your needs first and ask again. And I would suggest taking your time.

    P.S. If it is an option, always prefer a Database to store your data rather than any other mean.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Solution Explorer

    Multiple departments with their own requirements are usually key to extreme "mix" (to simplify the naming) of data between different departments.

    There are useful application design patterns where you can manage all that mess, but if you never dealt with that it is better to stick to what I wrote before: create monolith application without multiple modules. But (as I already wrote) split your app in appropriate classes and structure in subdirectories.

    If you dig deeply into the problem, you can try to separate the app from "clicks" to other two categories: commands, that users invoke when the want to do specific job, and queries, when they need to see some specific data. This way you don't have to think of DataGridView binding problems (just an example of something asked here million times) but how the real user interaction and workflow should work.

  6. #6
    Member
    Join Date
    Jan 2021
    Posts
    46

    Re: Solution Explorer

    Quote Originally Posted by Poppa Mintin View Post
    Along with the sunshine there has to be a little rain sometime.
    Reminded me of my old favourite "I beg your pardon".
    https://youtu.be/a7cqwqcolqk.

    Makes me very nostalgic.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by Poppa Mintin View Post
    Hi Niktsol,

    This sounds as though you wish to make a suit of projects which can communicate with each other ?

    This being so, the answer is yes, it's a simple matter of storing your data somewhere accessible to them all, for example, text files or even in the registry.

    poppa

    Yes, that is exactly what i want. I thought it already myself and i believe it is the most common solution regarding the particular platform. The best way in my opinion is in registry, or text files which stored not locally. But i wonder myself. What is the purpose of solutions explorer, rather than project container? I mean if i store in one solution many projects which are totally different themselves what is the meaning of the procedure besides archiving i guess?. But anyway, thank you for your answer.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by peterst View Post
    I wrote quite extensive comment, but better to write something suitable for this case: create monolith application for single department and then try to think how to structure the project and split into libraries. If you use subdirectories for different modules and separate UI from backend code (database access and most of app logic) then it will be easy.

    Visual Studio has different type of projects to create so you can initially start with Blank solution. Inside the solution you can add solution folders which are virtual one and are not created in the file system. You can add new (or existing) project inside each solution folder. With proper virtual and file system structure you can get really good results. But first start with monolith if you haven't done this before.
    Yes this is one of my intentions. Create a main form, which will be the main menu according to user rights. For example if a user logins as a secretary he will be able to open the documents' reference form which is giving a unique reference number per year, in each incoming documents. If someone works at the Human Resources Department he will be able to open the human resource application respectively and so on. So this is where the design effort takes place at first!!!

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    I understand and thanks for your answers. I was involved with VB6 back in late 90s and early 00s and what you said reminds me a lot. I think, based on your answers, that i must determine the nature of each app, or in some cases if the nature of the procedures are slightly the same, then work with different views in user's sight (forms) that retrieve data from the same source, i.e. the same table. The output might be slightly different. As i mentioned before, I've got a lot of work to do on paper and brainstorming as well!!

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by sapator View Post
    It really depends on what you want to do.
    Building an company structure project can go a lot of ways. It can also depend on the size of the company, the databases you have available, the servers the employees PC power etc etc.
    As I've worked with several companies in the past , we usually broke down the projects. For example, Marketing department, Accounting, Sales , IT etc.
    Sometimes communicating with each other branches is a real pain, for example the Accounting would always have an intermediate cube for communication with other departments.
    But, as I see from your request, I suspect that you only need employee basics. If that is the case then I would suggest a Web Application with an intermediate layer of web services.
    If that is something that you haven't done before, then it is preferable, at least for me, to have the common data stored in a main database and users can select the data from there. But here you might need to build your app and db so that 2 users from different departments cannot change the data at the same time. There are mechanisms for that but my suggestion is first to break down you company layers, for example, accounting needs, IT needs, Sales needs etc. Then find the commons between them and then post back here with more specific requests. I tried to help in a general idea but this is to broad to say, do this or do that. You must compact your needs first and ask again. And I would suggest taking your time.

    P.S. If it is an option, always prefer a Database to store your data rather than any other mean.
    I understand what you write. My objects at my service are different. But yes, by thinking of it, there is a common database which shall be used for CRUD procedures, with no mess at all. Unfortunately i haven't been involved with Web Applications, it's been a long time since i was programming (back to late 90s, early 00s) and things have changed a lot. At least the database design principles are the same.
    Last edited by si_the_geek; Feb 22nd, 2021 at 05:00 AM. Reason: fixed typo in tags

  11. #11
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Solution Explorer

    So this is what you can do on paper (or in Paint and Notepad):



    First start with applications, then add modules and just link where you will use them. Then continue splitting and see where you need to share data or functionality so these should be separate libraries so you can reference from other projects.

    Finally create the directory structure where you will place the projects in your (as you decide where and what to put) logical structure. I've used to write the text in the graphic but text file is better as you can edit the information and change on the fly where you find flaws in structure.

    By creating visual links you will find sometimes circular references for projects (project A has reference to project B; project B has reference to project A) so you can re-design that to use common/shared project C which is referenced by both project A and B.

  12. #12

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by peterst View Post
    So this is what you can do on paper (or in Paint and Notepad):



    First start with applications, then add modules and just link where you will use them. Then continue splitting and see where you need to share data or functionality so these should be separate libraries so you can reference from other projects.

    Finally create the directory structure where you will place the projects in your (as you decide where and what to put) logical structure. I've used to write the text in the graphic but text file is better as you can edit the information and change on the fly where you find flaws in structure.

    By creating visual links you will find sometimes circular references for projects (project A has reference to project B; project B has reference to project A) so you can re-design that to use common/shared project C which is referenced by both project A and B.
    Thank you very much!!

  13. #13
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Solution Explorer

    The forum made local copy of the picture even I clicked not to so there is updated version. Just refresh the page and see my previous post.

  14. #14

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by peterst View Post
    The forum made local copy of the picture even I clicked not to so there is updated version. Just refresh the page and see my previous post.
    Yes i saw it with the picture, no worries!! But i really really don't understand the usefulness of Solutions explorer rather than project container or archiving, since it is a little bit tricky for projects to integrate "on the fly". Perhaps the two reasons i mentioned, are the ones for which it was designed

  15. #15
    Fanatic Member
    Join Date
    Jun 2019
    Posts
    557

    Re: Solution Explorer

    Solution explorer is like file explorer. But you can have different virtual folder structure compared to the one on your hard drive (or ssd).

    Solution itself is container for multiple (virtual) solution folders and projects that reside in these folders. Projects can be applications or libraries. You will have few applications and many class libraries if you split your application into multiple modules (class libraries).

    I already wrote, but don't start with app (windows forms, console) or class library. Create blank solution and place it in the root folder of your solution. Then in the solution explorer you can add solution folders - Applications, Modules, Libraries, Tools, Tests... Save all and check what you have in the file explorer - still single .sln file and no folders.

    Right click (in solution explorer) on folder, e.g. Applications and click on Add new project. Here you will create the real folders and files on your hard drive. If you want to keep it organized, then create Applications folder in your solution directory and then inside that folder create the new winforms application. Set the location to the \Solution\Applications folder and set the project name, e.g. HumanResourcesApp. Click Create and then save all files (to be sure that everything is saved on your disk) and check what happened in file explorer.

  16. #16

    Thread Starter
    Junior Member
    Join Date
    Feb 2021
    Location
    Greece
    Posts
    17

    Re: Solution Explorer

    Quote Originally Posted by peterst View Post
    Solution explorer is like file explorer. But you can have different virtual folder structure compared to the one on your hard drive (or ssd).

    Solution itself is container for multiple (virtual) solution folders and projects that reside in these folders. Projects can be applications or libraries. You will have few applications and many class libraries if you split your application into multiple modules (class libraries).

    I already wrote, but don't start with app (windows forms, console) or class library. Create blank solution and place it in the root folder of your solution. Then in the solution explorer you can add solution folders - Applications, Modules, Libraries, Tools, Tests... Save all and check what you have in the file explorer - still single .sln file and no folders.

    Right click (in solution explorer) on folder, e.g. Applications and click on Add new project. Here you will create the real folders and files on your hard drive. If you want to keep it organized, then create Applications folder in your solution directory and then inside that folder create the new winforms application. Set the location to the \Solution\Applications folder and set the project name, e.g. HumanResourcesApp. Click Create and then save all files (to be sure that everything is saved on your disk) and check what happened in file explorer.
    You are right. I was wondering previously, since there is an option to compile the solution itself. That was the reason i started this thread. I figure out "since Visual Studio provides solution compilation, why not communicate each project with another in the same solution?". But i was wrong and i'll try to implement my thought based on your ideas. I have already created some modules as well as some libraries, Once again thank you very much for your instant replies.!!!

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