That is not really about a Factory, just about creating objects
I know. But things are meant to be learned in a certain order. Factory seems to be the next thing to learn after the "c++ class" lesson. Factory stands for more than just one thing, but those things designated with the word 'factory' although different they still somehow resemble. Basically the factory pattern upgrades the understanding of constructor and destructor concepts. It`s like traditional German house windows, everybody knows Germans are the best car makers. That means they gave a good grip on the things that go into making a car. Germans had the best tanks in WWII so that explains why Germans have a good grip on the concept of car body/frame. The problem is tanks didn`t had windows (and still don`t till this day) so someone arranged things such that Germans have a good grip on the concept of physical windows too, German houses have a two layer windows system (which is basically two windows in one): the usual window made of glass and metal/wood frame and then the wooden only layer/covering meant to protect the windows from physical damage.
Some projects are as you describe. The only way to analyze dependencies is by #include directives, which aren't even reliable. Ones that aren't needed don't necessarily get removed. And others that should be added aren't, because the header in question gets accidentally included, transitively. Sometimes A.cpp#includes B.h, and B.cpp#includes A.h for reasons of collaboration. Such circular dependencies are sometimes unavoidable.
Layering is the main way to impose higher level structure. The software is organized into static or dynamic libraries that preclude circular dependencies. That is, if library B has a file that #includes a file in library A, then no file in A can #include anything in B. This allows libraries to be tested independently and also allows an application to be developed without having to use a monolithic code base that contains various things that the application doesn't need.
In the real world companies end up with software that was created by many people over time.
As with everything else that humans are involved in quality tends towards the average. That includes design which impacts what you refer to as 'structure'.
Programmers also like to think that they know for certain that the best way to do something is the way they know. Which is completely subjective.
So they create new 'better' solutions willy-nilly and hack them into existing code bases because of that. Then they leave the company and someone else starts doing it. Overtime this leads to significant organizational problems.
Even in the best systems there are real world business requirements that only come up long after the original design and for which the original design did not account. And the company is not willing to pay to refactor the entire code base when this happens. Even worse if it wasn't well designed. Or with 'better' ways on top of it.
And developers seldom consider the long term impact on maintenance when they make radical decisions to go in a different direction on a code base. It is known (multiple studies) that maintenance costs are always 2 to 10 times higher than the original cost to develop the product. And 100 times higher is probably reasonable for some.
Might note that although I point out developers in the above I have never seen a company that was actually willing to recognize the maintenance costs much less put an emphasis on mitigating for that.
I have a WPF app in which I'm using DevExpress Reporting.
To create a report based off a List<t> there is a wizard which allows you to choose "Object Data Source". When you choose that you see a list of entities in your app that are marked with the attribute "[HighlightedClass]". This attribute is defined in the namespace "DevExpress.DataAccess.ObjectBinding".
My WPF UI, DAL, BL, and entities are all defined in seperate projects. This all works fine.
Now I'm working on a Xamarin Forms project that will use the same DAL, BL, and entities to pull data from the WPF project into an Android app.
My shared mobile project has references to the DAL, BL, and entities. And this is where the problem is... when I deploy to the Android I get deployment errors saying that the Android project can't resolve references to DevExpress assemblies.
I'm sure that if I were to remove the "[HighlightedClass]" attribute from the Entities project then everyting would deploy fine. But then I would not be able to create new reports in the WPF project.
One idea I have is to create local models in the WPF project for reporting. My UI project could call back into the back end, get back a list of data as LIST<t>, them map them to local models which would use the attribute. This way the attribute only appears in the WPF project where the reporting happens. The Entities project would no longer know about DevExpress. And the Android app would no longer complain about it.
But this is a lot of work and could create maintenance headaches as I would have local Models that are exact duplicates of the Entity classes in the Entites project. I would have to make changes in two places.
I'm open to suggestion here.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
Experienced people might be expected to look at that. I would not expect someone with no experience to know to do that. Same as I would not be able to expect them to craft specific enough google queries to return relevant results to many programming problems.
American English speakers (not sure if Great Britain English speakers do this so I'm being specific) will often use they, their, them for a single person being referenced as was being done in the post you commented on. I am fairly sure that is what happened in that post rather than that person assigning a pronoun to you(2nd person pronoun).
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
The answer is no. Technology and science is based on a progression from past achievements. And it is also impacted by economics. You can read up on the practical problems associated with building some of the tallest buildings in the world right now. That would include things like the base of the building, how they deal with sway and some of the tricks that they use to get to be the "tallest" without actually paying to build something useable to that height.
I`m not sure which branch this subject belongs to, D&A seems `general` enough so I`m attaching my question here. The question is is there a difference between the algorithms that operate with bits and those created for a quantum computer?
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
The quantum computer mechanics work on the qubit which is a two-state quantum-mechanical system that is one of the simplest quantum systems and the bit refers to the binary digit system which is basically a unit of the amount of information in computer.
Last Visit: 31-Dec-99 19:00 Last Update: 27-Jan-23 18:13