Microsoft is trying to achieve consistency among all the classes in AX to have the following condition met:
Each class has construct method which takes no parameters. This constructor should be the primary entry point for class construction, e.g. any other constructor should use construct() inside.
For the same reason, to avoid direct instantiation of the objects via new() method they are marked as protected. It is done in such way because it looks like overriding is much more maintainable than overlaying. It is better to create a sub-class in the outer layer that extends super-class in inner layer and overrides the required method + have construct() method overlaid to instantiate sub-class instead. Code upgrade in this case seems to be much cheaper comparing to the case when methods are overlaid directly on the super-class.
So my question basically is, if this statement is correct or not? Are you writing code in the described way? If no, why? What are the cases when overlaying is better that overriding?
Can you give a example here to make the scenario more clear ?
ReplyDeleteThe general way we followed earlier was
to create new methods and have a single construct
method in the base class. Then use the construct method
for all types of construction.
Eg: as in InventMovement class
But recently after looking at the BP warning of
making the new method protected we have moved to the new
model where we create new methods for every subclas
and make them protected and also have an constructor for it
After this we create a factory kind of method in the base class
and use that to create different instance.
But still i think widely the first method is
adopted by other developers.
It's an remarkable article for all the web people; they will take advantage from it I am sure.
ReplyDeleteFeel free to surf to my website: windows xp registry cleaner
my web site > registry cleaner software
This is very fascinating, You are an overly skilled blogger.
ReplyDeleteI have joined your feed and stay up for looking for extra of your wonderful post.
Also, I have shared your website in my social networks
Feel free to visit my page :: Sidney Crosby Black Jersey
Attractive section of content. I just stumbled upon your weblog and in accession capital to
ReplyDeleteassert that I get in fact enjoyed account your
blog posts. Anyway I will be subscribing to your augment and even I achievement you
access consistently rapidly.
Here is my website NFL Cheap Jerseys
Attractive component of content. I just stumbled upon your
ReplyDeletewebsite and in accession capital to say that I get actually enjoyed account your weblog posts.
Any way I will be subscribing on your augment or even I achievement you access persistently fast.
Review my website: Wholesale Jerseys
Hello, I would like to subscribe for this website to take newest
ReplyDeleteupdates, thus where can i do it please help out.
Feel free to surf to my web-site - NFL Jerseys Cheap
Hurrah! After all I got a website from where I be able to in fact obtain helpful facts regarding
ReplyDeletemy study and knowledge.
Also visit my blog; Sac a main Guess
I love reading through a post that will make people think.
ReplyDeleteAlso, thank you for permitting me to comment!
Also visit my website - Abercrombie Bruxelles
That is a great tip especially to those new to the blogosphere.
ReplyDeleteShort but very precise info… Thank you for sharing this one.
A must read post!
Here is my page - Chaussure De Foot
Hello there, I found your web site via Google while searching for a comparable subject, your
ReplyDeletesite came up, it appears great. I have bookmarked it in
my google bookmarks.
Hello there, simply was alert to your blog thru Google, and found
that it's truly informative. I am going to watch out for brussels. I'll be grateful if you
happen to continue this in future. Numerous
other folks can be benefited from your writing. Cheers!
Look at my page :: Nike Air Max
Ridiculous story there. What happened after?
ReplyDeleteGood luck!
my blog post: Louis Vuitton Handbags
I like reading through an article that can make people think.
ReplyDeleteAlso, thank you for allowing for me to comment!
My web blog Cheap Jerseys3