[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Is this allowed in MVC pattern? Or should i really go through
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 1
File: java.png (7 KB, 259x259) Image search: [Google]
java.png
7 KB, 259x259
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 replies: 15
Thread images: 1

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.