Unsay 'unsa nga klase nga principle'? Kasabot ka sa imo pangutana? Ang dapat nimo question is 'principle sa unsa?' mao na ang dapa nimong pangutana.
And the answer is too obvious that anyone reading this post can answer you. Of course it is a principle in software development!
Klaro gyud bro @yanong_banikanhon nga ikaw jud ang wala pa kasabot! Kay magpataka na lang ka ug pangutana!
Tan-awa lagi. Wala gyud lagi makasabot sa tinuoray nga meaning aning Inversion of Control. Dili man tawon ang Spring framework maoy ga-control sa execution sa imong mga classes bro. Ang trabaho sa Spring is just to inject dependencies. It does not hold the control of execution. Mao gyud nay resulta aning gamit2x lang og term unya wala diay makasabot sa meaning.
Tan-aw na lang sa wikipedia mga abay. Kay morag hopeless ang situation. Mao ni nakasulat sa wikipedia ay:
In other words, it is the implementation classes (not the SPRING framework) that controls the execution of the business rules. The aggregate class (user class in your terminology) just calls the functions in generic order and transfer the control to the instance of a particular implementation class. This is possible if we follow the 'program against the interface' principle. One thing to note, in the context of this principle, the word interface doesn't necessarily means IInterface (a programming construct in C#, Java, etc...). It could also be an abstract class (public abstract BlahClass).In traditional programming the flow of the business logic is controlled by a central piece of code, which calls reusable subroutines that perform specific functions. Using Inversion of Control this "central control" design principle is abandoned. The caller's code deals with the program's execution order, but the business knowledge is encapsulated by the called subroutines.
Sa sunod bay, kun mogamit gani mo og mga technical terms, for the benefit of the TS and the rest of the readers, please provide clear explanation. Ang atong purpose diri is to help each other understand difficult concepts, not to brag or confuse others. Peace.
whoos! lusot oi!!!
maayo kaayong pagpangopya sa wikipedia. ang gaingon nga dili mutanaw ug wikipedia mao ra say nangopya gikan didto. plastik!
mao nay gi-ingon nga istoryaheeeeee!!!!![]()
@maddox22 gapa-impress man gud ni si bro @yanong_banikanhon. Maong kunuhay expert na. tsk tsk... maayo kaayong pagkakopya o! ang imoha diay @yanong_banikanhon? HAHAHAHAHA!!!
Mao nay giingon bro nga empty your cup first.
@maddox: Unya uyon naka bay nga dili si Spring framework maoy nag-control sa logic sa imong user class?
Naa rang ako bay, ay. I-post nakog utro para imong makit-an.
Gi-quote lang nako ang wikipedia para dili mo makaingon nga nagbuot2x ko og definition.In other words, it is the implementation classes (not the SPRING framework) that controls the execution of the business rules. The aggregate class (user class in your terminology) just calls the functions in generic order and transfer the control to the instance of a particular implementation class. This is possible if we follow the 'program against the interface' principle. One thing to note, in the context of this principle, the word interface doesn't necessarily means IInterface (a programming construct in C#, Java, etc...). It could also be an abstract class (public abstract BlahClass).
Next time, understand first the term before using them. Remember, DI framework does not control the logic of the 'user class'. It just manages the injection of dependencies. Lately, ang mga software developers gitawag sa uban og mga snake oil salesmen of the 21st century. Help us clean the image of our industry by not spreading wrong information.
Wala pa diay ni nahuman... That was a good explanation @yanong_banikanhon - if only those were your own words. But I'm afraid you're one of those people who find faults from others to make it appear you look superior when in fact it is you who is really ignorant.
I hope this silly childish argument ends! For the sake of the @TS... these terms IOC, DI, Factory pattern are not as advanced as @yanong_banikanhon here believes. Sooner or later you'll encounter these because this is what's out there right now. When you join a company there is a big chance you'll be encountering them and using them.
Despite all the arguments here I go back to what I stated about loose-coupling. The lesser the dependencies between your software components are the more flexible and reusable they become. Programming against interfaces is one of the best practices you can learn as a developer.
And if you really want to learn, as the previous poster here said, empty your cup first and... well don't be like @yanong_banikanhon.![]()
I don't mean to take sides but I think this explanation from @maddox22 is oversimplifying it. In a way this is still correct - although not textbook correct. The point of IOC is removing the control from the user class. Transferring that control to the implementing classes is merely a process of emphasizing the business logic or which implementing class should be used. That is still within the context of a developer's responsibility and discretion even with the Spring framework if you like.
So in a way, @maddox22 has a point, and for you @yanong_banikanhon not to see that only means you understand this concept by the surface and not its depth.
Again, the main point of IOC is to remove the control from the user class and decoupling your software components making your components flexible and reusable.
Similar Threads |
|