[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is this allowed in MVC pattern? Or should i really go through

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 1

File: java.png (7KB, 259x259px) Image search: [Google]
java.png
7KB, 259x259px
Is this allowed in MVC pattern? Or should i really go through all the hassle of applying an observer pattern as well?


Controller:

listInView = listInModel;



I need some coordinates stored in the model sent to my view.
>>
>>54870435
>design patterns
Found your problem, use C instead
>>
One problem = one design pattern
Those patterns are here to keep the code clean. Don't mix them.
>>
Every line of code should be studied at least 2 days before writing it down.

If you're not sure whatever or not you can do that, don't do it. K
>>
>>54870822
>Implying observer pattern isn't part of MVC
>>
>>54870822
>Those patterns are here to keep the code clean
I thought they were there so that developers would kill themselves
>>
>>54871152
Go read what is MVC, pleb
>>
I don't see how design patterns are useful. I understand the whole "program to an interface" thing, but how do overcomplicated factories and visitors and shit make anything better?
>>
>>54871624
They're proven to be good solutions for recurring problems.
If you don't know why "overcomplicated factories and visitors and shit" are useful you haven't run into a problem that is solved by them
>>
>>54871624

Been doing development work for I think 12 years. Been through procedural programing, to OOP, to Babylon inheritance structures to now dependency injection. Have to say that I wouldn't really take design patterns too seriously.

Vast majority of the time you will be working with a pre-exisitng code base. You cannot really do anything to improve the codebase because its vital for the business needs. Eg.. you have a web server that is written in C, that is communicating with python to generate docx systems, and the back-end is a unknown unsupported database that no-one supports even more. Then you have java in the mix somewhere in there. All these applications are running on a unix system that was installed by IBM in 1990.

It all works, but its kind of the same thing you say when you can see the road from the passenger seat in your car because its so old.

Back to the issue! Should you learn design patterns? Well it wouldn't really hurt. Though when I read design patterns my main thought was `these are great is there any data to backup some of their ideas?`

Then you research design patterns and find the singleton and the vistor pattern are the most error prone patterns you can ever use. Then you go into work and find that everyone uses it. So go figure.
>>
>>54871655
>>54871743
Huh, cool I guess.
Took a project course last semester and the professor tried to get us to use design patterns on the final project for extra credit. I didn't do it, but I could see how it would've been helpful. To me, it just seemed like there would've been more classes to maintain and that freaked me out.
I'll try it out the next time I have a personal project or something.
>>
>>54871800
>seemed like there would've been more classes to maintain and that freaked me out.
>I'll try it out the next time I have a personal project or something.

Good luck getting anything done if you ever try to use a design pattern


/OP
>>
>>54871800

Here is the thing with design pattern, and most of the stuff you read online concern encapsulation, abstraction, separation of concerns ect... all the time is anecdotal evidence.

Once you learn about primitive data types, procedures, classes, objects, operators, binary operators and algorithm's there is very little value I would say in design patterns or any type concept around everything stated above.

Instead I would focus your time in science, mathimatics, and accounting. They're more exact sciences that you can do more with.
>>
>>54870435
>observer pattern
as in RxJava?
>>
I can't imagine any of you shipping products for a living. The modern web of the last decade is built two major patterns. MVC and IoC (in the form of dependency injection).
Thread posts: 15
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.