معماری MVC
MVC مخفف Model View Controller است.
MVC مخفف Model View Controller است.
در اینجا سه لایه معماری وجود دارد که M برای V ، MODELS برای View و C برای مهمترین قسمت ، معماری Controller . به هر لایه در MVC مسئولیت خاصی اختصاص داده شده است . View برای ظاهر است و مسئولیت نمایش خروجی نهایی به کاربر را دارد . Model ، داده ها و منطق کسب و کار را تامین می کند . بنابراین ، Model چیزی جز کلاس نیست . Model میتواند با لایه data access در تعامل باشد . بعضی از Sreviceها ، مانند سرویس WCF یا Web Service ، که داده ها را میدهند . Controller در واقع قلب MVC است ، آن با هر دو لایه سر و کار دارد . به همین دلیل است که به Controller ، هماهنگ کننده (coordinator) بین Model و View نیز می گویند .
در MVC ، اگر کاربر از مرورگر یک درخواست ارسال کند ، ابتدا این درخواست به Controller میآید . Cotroller آن را به View مناسب ارسال میکند. در خواست داده ها به کاربر می رود و Controller به کلاس Model می رود ، به این دلیل که model ها همیشه اطلاعات را حمل میکنند . همان طور که اشاره شد ، اگر ما یک لایه را تغییر دهیم ، تمامی لایه های دیگر دست نخورده باقی می مانند . این یکی از ویژگی های ویژه MVC است که آن را بی نظیر میکند . اینجا ، نمودار دوم فایل Controller و فایل های ضمیمه شده به آن را ، توضیح می دهد ،همچنین دارای یک فولدر Model میباشد که شامل تدارکات کلاس customer است .
3 دیدگاه. ارسال دیدگاه جدید
I wish to show appreciation to this writer for rescuing me from this particular condition. After surfing throughout the internet and finding notions which are not beneficial, I figured my life was gone. Living without the presence of solutions to the problems you have resolved through your good short post is a crucial case, and the ones that might have badly affected my career if I hadn’t discovered your website. Your actual knowledge and kindness in handling almost everything was useful. I don’t know what I would have done if I had not come upon such a step like this. I am able to at this point relish my future. Thanks for your time so much for this specialized and result oriented guide. I won’t think twice to propose your web page to any person who needs and wants care about this area.
I have to point out my love for your kindness supporting people who must have assistance with this one concern. Your special commitment to passing the message throughout has been rather insightful and has continually allowed individuals like me to get to their desired goals. Your entire important advice signifies this much to me and further more to my office workers. Best wishes; from each one of us.
I want to express my appreciation to you for rescuing me from this particular problem. Right after looking out through the online world and seeing opinions that were not productive, I thought my entire life was well over. Living without the presence of solutions to the difficulties you have resolved all through the guide is a crucial case, and ones which may have adversely affected my career if I hadn’t encountered your website. Your good talents and kindness in dealing with every aspect was helpful. I’m not sure what I would’ve done if I had not encountered such a point like this. I’m able to at this point look forward to my future. Thanks a lot very much for the reliable and amazing guide. I won’t think twice to endorse the sites to any person who should receive assistance about this topic.