Monday, May 3, 2010

Overlay vs override

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?

48 comments:

  1. Can you give a example here to make the scenario more clear ?

    The 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.

    ReplyDelete
  2. It's an remarkable article for all the web people; they will take advantage from it I am sure.

    Feel free to surf to my website: windows xp registry cleaner
    my web site > registry cleaner software

    ReplyDelete
  3. This is very fascinating, You are an overly skilled blogger.
    I 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

    ReplyDelete
  4. Attractive section of content. I just stumbled upon your weblog and in accession capital to
    assert 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

    ReplyDelete
  5. Attractive component of content. I just stumbled upon your
    website 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

    ReplyDelete
  6. Hello, I would like to subscribe for this website to take newest
    updates, thus where can i do it please help out.

    Feel free to surf to my web-site - NFL Jerseys Cheap

    ReplyDelete
  7. Hurrah! After all I got a website from where I be able to in fact obtain helpful facts regarding
    my study and knowledge.

    Also visit my blog; Sac a main Guess

    ReplyDelete
  8. I love reading through a post that will make people think.
    Also, thank you for permitting me to comment!


    Also visit my website - Abercrombie Bruxelles

    ReplyDelete
  9. That is a great tip especially to those new to the blogosphere.
    Short but very precise info… Thank you for sharing this one.

    A must read post!

    Here is my page - Chaussure De Foot

    ReplyDelete
  10. Hello there, I found your web site via Google while searching for a comparable subject, your
    site 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

    ReplyDelete
  11. Ridiculous story there. What happened after?
    Good luck!

    my blog post: Louis Vuitton Handbags

    ReplyDelete
  12. I like reading through an article that can make people think.
    Also, thank you for allowing for me to comment!

    My web blog Cheap Jerseys3

    ReplyDelete
  13. Hello, yup this paragraph is actually pleasant and I have learned
    lot of things from it about blogging. thanks.

    My homepage Air Jordan 2013

    ReplyDelete
  14. It's very straightforward to find out any topic on net as compared to books, as I found this piece of writing at this web page.

    Feel free to visit my web site: Mulberry Bags

    ReplyDelete
  15. I truly love your blog.. Excellent colors & theme.

    Did you create this site yourself? Please reply back as I'm looking to create my own personal website and would like to find out where you got this from or just what the theme is called. Thanks!

    Here is my website - Louis Vuitton Outlet

    ReplyDelete
  16. I do not know if it's just me or if perhaps everybody else encountering issues with your website. It appears like some of the text within your content are running off the screen. Can somebody else please comment and let me know if this is happening to them too? This might be a issue with my browser because I've had this
    happen before. Thanks

    Also visit my weblog; Cheap Louis Vuitton Bags

    ReplyDelete
  17. You really make it seem so easy with your presentation however I in finding this
    matter to be actually something which I believe I'd never understand. It sort of feels too complex and very vast for me. I'm having a look forward
    in your subsequent publish, I will try to get the grasp of it!



    Feel free to surf to my blog post michael Kors handbags

    ReplyDelete
  18. I read this piece of writing fully regarding the comparison of newest and previous technologies, it's amazing article.

    Review my blog; Cheap NFL Jerseys

    ReplyDelete
  19. I like reading a post that can make men and
    women think. Also, thank you for allowing for me to comment!


    My page: Sac Louis Vuitton Pas Cher

    ReplyDelete
  20. I'm really enjoying the design and layout of your blog. It's a very easy
    on the eyes which makes it much more pleasant for me to come here and visit more often.
    Did you hire out a designer to create your theme? Superb work!



    my web site - Air Jordan Pas Cher

    ReplyDelete
  21. Very quickly this web page will be famous among all
    blogging and site-building visitors, due to it's nice articles or reviews

    Review my blog Cheap Louis Vuitton Bags

    ReplyDelete
  22. A motivating discussion is definitely worth comment.
    I think that you need to publish more about this subject, it might not be a taboo matter but usually folks don't speak about such topics. To the next! Many thanks!!

    Also visit my weblog Abercrombie And Fitch

    ReplyDelete
  23. Great delivery. Great arguments. Keep up the amazing spirit.


    Feel free to visit my web page :: Jordan Femme

    ReplyDelete
  24. Good article. I absolutely appreciate this website. Stick with it!


    my website http://www.pakistani.im/

    ReplyDelete
  25. Wonderful post! We are linking to this great post on
    our website. Keep up the good writing.

    My web blog ... Air Max One

    ReplyDelete
  26. I was wondering if you ever thought of changing the page layout of your website?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.

    Youve got an awful lot of text for only having one or 2 pictures.

    Maybe you could space it out better?

    Have a look at my blog post; Click This Link

    ReplyDelete
  27. This text is priceless. When can I find out more?

    Review my blog post :: additional info

    ReplyDelete
  28. I am extremely impressed with your writing skills as smartly as with the layout
    in your weblog. Is that this a paid subject matter or did
    you customize it yourself? Anyway stay up the nice high quality writing, it's uncommon to see a great blog like this one nowadays..

    Here is my web page; Louis Vuitton Pas Cher

    ReplyDelete
  29. These are really enormous ideas in on the topic of blogging.

    You have touched some good things here. Any way keep up wrinting.



    My site - Tory Burch Handbags

    ReplyDelete
  30. Thanks in support of sharing such a nice thought, post is good, thats why i have
    read it entirely

    My web page :: Nike Free 7.0 [ngosummit.com]

    ReplyDelete
  31. I was wondering if you ever thought of changing the page
    layout of your blog? Its very well written; I love
    what youve got to say. But maybe you could a little more in the way of content so
    people could connect with it better. Youve got an awful
    lot of text for only having one or two pictures. Maybe you could space it
    out better?

    Feel free to visit my web site ... Christian Louboutin Sale

    ReplyDelete
  32. Fantastic beat ! I would like to apprentice while you amend your website,
    how could i subscribe for a blog web site?

    The account helped me a acceptable deal. I had been a little bit
    acquainted of this your broadcast provided bright clear idea

    My web page ... Air Max Pas Cher

    ReplyDelete
  33. Hello there! This post couldn't be written any better! Reading this post reminds me of my good old room mate! He always kept chatting about this. I will forward this write-up to him. Pretty sure he will have a good read. Thanks for sharing!

    Here is my webpage: Louis Vuitton Pas Cher

    ReplyDelete
  34. Touche. Sound arguments. Keep up the amazing effort.



    Feel free to visit my web blog; Soldes Air Jordan

    ReplyDelete
  35. I do not even know how I stopped up here, however I believed
    this publish used to be great. I do not know who you
    are but definitely you are going to a famous blogger should you are not
    already. Cheers!

    Also visit my webpage - Louis Vuitton Bags

    ReplyDelete
  36. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make
    your point. You obviously know what youre talking about, why waste your intelligence
    on just posting videos to your site when you could
    be giving us something informative to read?

    my website - Michael Kors Outlet ()

    ReplyDelete
  37. Unquestionably imagine that which you stated. Your
    favourite justification appeared to be at the net the easiest
    factor to bear in mind of. I say to you, I certainly get irked
    while people consider issues that they just do not realize about.
    You controlled to hit the nail upon the highest and also defined out the entire thing with no need side effect ,
    people can take a signal. Will likely be back to get more.
    Thanks

    Also visit my web site :: sell beats fast

    ReplyDelete
  38. Pretty! This was an extremely wonderful article. Thank you for providing this information.


    My web blog: Mulberry Bags

    ReplyDelete
  39. Hello! This post could not be written any
    better! Reading this post reminds me of my old room
    mate! He always kept talking about this.
    I will forward this write-up to him. Pretty sure he will
    have a good read. Many thanks for sharing!


    Also visit my site; Air Max

    ReplyDelete
  40. We're a gaggle of volunteers and opening a new scheme in our community. Your web site provided us with helpful info to work on. You've done an impressive task and our whole neighborhood will probably be grateful to you.


    Also visit my web-site :: Wholesale Jerseys

    ReplyDelete
  41. I think this is one of the most significant info for me.
    And i am glad reading your article. But wanna remark
    on some general things, The site style is ideal, the articles is really excellent
    : D. Good job, cheers

    My site: Louis Vuitton Handbags Outlet

    ReplyDelete
  42. WOW just what I was searching for. Came here by searching for 200
    dirt bike

    Check out my web page Get the Facts

    ReplyDelete
  43. hello!,I really like your writing so much! percentage we keep
    up a correspondence extra approximately your article on AOL?
    I need an expert in this house to unravel my problem.
    Maybe that's you! Looking forward to peer you.

    Also visit my web site; Air Jordan

    ReplyDelete
  44. I almost never comment, but i did some searching and wound up here
    "Overlay vs override". And I do have a few questions for you if it's allright. Is it only me or does it seem like a few of these responses appear like they are written by brain dead visitors? :-P And, if you are posting on other online sites, I'd like to keep up with everything new you have to post.
    Could you list of the complete urls of your public pages like your Facebook page, twitter
    feed, or linkedin profile?

    my web site: Nike Blazers

    ReplyDelete
  45. What a data of un-ambiguity and preserveness of valuable familiarity about unexpected
    feelings.

    My page; Air Max

    ReplyDelete
  46. Amazing! Its really remarkable article, I have got much clear
    idea regarding from this post.

    Check out my website; source

    ReplyDelete
  47. What's up, this weekend is pleasant for me, since this point in time i am reading this great educational article here at my home.

    My blog post; Nike Trainers

    ReplyDelete
  48. This is axapta ERP blog for Technical and functional fields and includes Microsoft Dynamics Axapta tutorials and Dynamics Axapta Coverage. This blog also contains x++ code help for Ax developer and solution of technical and functional daily issues. This blog is specific for Microsoft dynamics programming. Enterprise portal, SharePoint services, business connectors and Enterprise Resource Planning applications and sql database.It will help to get Microsoft Business Solutions.


    axapta ERP blog

    ReplyDelete