Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mr Shiny Pants
Nov 12, 2012

NtotheTC posted:

Lots of reasons I guess. I hate Javascript from the outset. I despise the dev environment i.e. node, bower, grunt, etc. I hate Typescript, I also hate people who don't use Typescript. I hate the lack of best practices, I hate the piss poor documentation, I hate that tests are so annoying to write.

Tell us how you really feel :)

I feel the same, coming from something like C#, oh my......

Adbot
ADBOT LOVES YOU

Mr Shiny Pants
Nov 12, 2012

The Wizard of Poz posted:

Yeah it's the compiling of modules that I'm interested in, think I'll continue to use npm scripts with watchify/browserify since that works fairly well so far.

On a related note (kind of) I am trying to figure out how best to handle models in JS. Because JS really has no actual type enforcing I was wondering how people tend to keep their data models as consistent as possible? For example, if I want to use a "student" model in a few different places, is there some way to help me keep the properties consistent?

Make a JS file with just your models in it and load it everywhere you need them?

Mr Shiny Pants
Nov 12, 2012
Maybe you guys can help me with this, I just started with JS development and I am looking for a way to do the following:

I have inherited an application that uses its own collections and model binding that I am looking to extend.

This application uses a hierarchy of arrays and models within, a bit like thread, post and replies. So top model contains a collections of models that themselves have other models within them.

Can I use backbone for this? Can I have models that contain a collection of other models and still hook everything up with eventhandlers and the rerendering logic?

I've been reading up on Backbone and Ember but Ember is too much for me right now, so if Backbone can do it, it will save me some time.

Mr Shiny Pants
Nov 12, 2012

Wheany posted:

I haven't done anything with Backbone for a couple of years, but back then, Backbone didn't have native support for nested models. I don't know if that has changed. There were extensions that added that, but I haven't used them.

This is what I was afraid off, I've looked at Backbone relational but that is another layer I need to learn.

I took the plunge and installed Ember.js. We'll see how it goes. Ember.data looks promising.

Thanks.

Mr Shiny Pants
Nov 12, 2012
So in trying to learn Ember I've decided to do their ToDo MVC tutorial.

Half way in the stuff breaks with the following error:

code:

Error while processing route: todos Cannot read property 'fixturesForType' of undefined TypeError: Cannot read property 'fixturesForType' of undefined

Nice, and I was really looking forward to completing the tutorial. I don't even know where to start in fixing this. :(

Edit: Seems like a new version of Ember data fixes it...... nice!

Mr Shiny Pants fucked around with this message at 16:34 on Feb 9, 2015

Mr Shiny Pants
Nov 12, 2012

Wheany posted:

Welcome to Ember.

It gets better doesn't it? please say yes ;)

Mr Shiny Pants
Nov 12, 2012

Wheany posted:

My experience says no, but maybe you "get" the framework better than I do.

Seeing that I just started using it and already running into this, I would say hardly. :)

Edit: After doing some more research: Maybe I am misunderstanding these frameworks but is it really hard to create something like a drill-down?

Have a top level, click on it, it's child items appear, click on child item and it's child items appear.

This seems like something you would really want, and it looks to be really hard if I look at Backbone relational and all the other frameworks.

Mr Shiny Pants fucked around with this message at 20:31 on Feb 9, 2015

Mr Shiny Pants
Nov 12, 2012

Sedro posted:

This is exactly what ember is designed for, with nested routes and outlets

Thanks, at least I know I am on the right track. I will endure!

Mr Shiny Pants
Nov 12, 2012

PlaneGuy posted:

I'm such a loving front-end luddite. Gulp with babel and sass, then I... download dependencies from their respective websites and commit them to the repo :ohdear:


I dunno. After years of gems, nugets, and other such horseshit adding 18 bajillion dependencies to my projects because developer X just had to have the foreach function from library Y, I wanna concretely know what I'm making my users download. (In most cases knockout, require1k, lie to polyfill promises, my little ajax helper, and sometimes moment)

This. I mean they are just scripts right? Create scripts directory, download backbone and its dependencies and put them in the folder. Reference them and off you go. It makes it easy to reason about stuff. Works pretty well.

Mr Shiny Pants
Nov 12, 2012

Heskie posted:

Do you run the full GUI inside the VM and work within it (Editor/IDE etc) or just use the VM as a terminal/server and use Editors/IDEs on the Windows host?

I usually work on a Mac, but my new job has a Windows work station so I've been trying to use Windows more to get a better idea of a workflow.

I bought VMware fusion and run a Windows 7 install in OSX on which I use Visual Studio. A maximized window or Unity is wonderful on a 27" screen.

Mr Shiny Pants
Nov 12, 2012
Elm is the poo poo, I haven't had this much fun writing webpages since whenever. Thanks to the guy posting the video, you rock!

Fsharp syntax for webpages, what is not to like :)

Mr Shiny Pants
Nov 12, 2012
iOs is the same, went from a really discoverable UI to that flat stuff on which you just press things to see if they may interact.

Don't get me started on 3d push that works on some models and not on others.

That's what you get when stuff is "finished" but you just can't leave it alone.

Mr Shiny Pants
Nov 12, 2012
So back to plain old JS or TS it is then? :)

I like ELM a lot, it is lightweight and the guy making it has a Vision of how it should work. I like that in software.

Mr Shiny Pants
Nov 12, 2012

Lumpy posted:

I *love* Elm as well. In fact, I finished my first toy project in it: https://www.eskimospy.com/chordbook (source is linked in the footer)

No idea what I'm doing in it yet, and it has the "not a framework" problems as React+Redux I think, as well as "Oh, I have to write JS anyway with a port since Elm doesn't do that" problems, but it's fun to write!

The need for ports should become less and less as the community gets bigger and the core stabilizes. Otherwise I agree with you.

Mr Shiny Pants
Nov 12, 2012
I just read the linked page and I think I can understand his reasoning, Its the same argument as with an ORM I guess, all the extra work you need to do to get stuff from the DB when, if you had just learned SQL in the first place, stuff would be lot simpler and faster. SQL is still alive and kicking but NHibernate seems to have lost a lot of love since MS came out with EF.
Not saying it is 100% the same for webdevelopment though.

Reading the last of couple of posts, I am that guy learning stuff and undoubtedly doing stupid stuff with plain javascript and HTML right now. :)
Got to start somewhere I guess, otherwise its hard to see the forest for the trees with all the web stuff. Usually this works out though, you come across some repetitive coding work and figure out why you want a framework for some tasks instead of the other way around.

Mr Shiny Pants
Nov 12, 2012

a hot gujju bhabhi posted:

That's a pretty bold assertion.

That is what I was getting from his post. Maybe I read it wrong, but I read the just use CSS HTML etc. etc. as just use SQL like a lot of arguments against an ORM.

Mr Shiny Pants fucked around with this message at 08:33 on Jul 30, 2018

Mr Shiny Pants
Nov 12, 2012

Bruegels Fuckbooks posted:

NHybernate and Entity Framework and all that stuff are great products. What unfortunately happened is that the underlying architecture of a product is generally dictated by the structure of the organization, so if you have, say a database team, it'll become it's own monolithic organization, and many organizations that made the horrible mistake of using, say, Oracle as their back-end database ended up with scores of Oracle dbas, programmers, and a generation of legacy databases. EF is great if you're doing a database from scratch and don't have a database team, much less if you have to adapt a ten year old database designed by people who don't understand 3NF and that there are other datatypes besides varchar - however most of the entity framework applications in the wild ended up being "make a lovely legacy application/database use EF" and EF got blamed for the original design being lovely, to say nothing about idiots who would find a slow query, and both rewrite it in standard SQL and somehow conclude it was writing the sql that hand that fixed the problem as opposed to, you know, having an index on the column that needed it.

Good points, I was merely commenting on the fact that, as pointed out in the link, when a framework goes out of fashion all your knowledge is essentially worthless because a lot of that knowledge is tied to a specific ORM implementation/framework and how it handles stuff under the hood ( query plans, architecture, do's and don'ts etc. ). Whereas the underlying technology is still the same SQL. So you could make a point that if you had just learned the underlying technology instead of trying to pretend you don't persist to a relational model you'd be better off in the long run.

Not saying an ORM is useless it's just that there is a lot of stuff written about them and I thought the point he makes has some overlap with criticisms I've read about ORMs.

Or I could be misunderstanding the whole thing, it happened before. :)

Mr Shiny Pants fucked around with this message at 10:49 on Jul 30, 2018

Mr Shiny Pants
Nov 12, 2012
I do have a question, I am writing some simple pages and do some Ajax calls in the background to retrieve some data from my server, like the user details for the currently logged on user.

Where do I put this data if I need to reuse it and don't want to do a request every time this data is needed?

Can I just put the data in a Global? That sounds not quite right, on the other hand it is just one piece of data which is unique to the page and which won't be changed but I need it in quite a few places.

Mr Shiny Pants
Nov 12, 2012
Create one big picture with all the icons in it, overlay a table on it with cells spaced so the cell encapsulates the icon, put an index on the cell and a eventlistener on it so you can catch which icon the user clicks.

I don't know if this works. I thought it was fun to think about. :)

1,4 MB is not that big anyway.

Mr Shiny Pants
Nov 12, 2012

Love Stole the Day posted:

With my self-learning experience, I read a thing pretty early on that I still try to stick to. It goes something like:

When making stuff, you should do it in three phases, in this order:
  • Make it work
  • Make it fast
  • Make it pretty

I agree, but I also would like to point out that sometimes making it look pretty keeps you working on it longer instead of getting disappointed with it and abandoning it altogether.

YMMV of course.

Mr Shiny Pants
Nov 12, 2012

Doh004 posted:

If you're doing .NET, why WOULDN'T you use Visual Studio? I loving miss it so much.

*edit* Also, VS Code is dope and works great for so much.

Because you run Linux? Ionide is pretty awesome.

Mr Shiny Pants
Nov 12, 2012

Doh004 posted:

Do people develop .NET on non Windows machines these days? I haven't done it in 6+ years so I'm definitely not up to speed on it anymore.

Hadn't heard of Ionide, looks interesting :)

I do. :) Only F# though.

Adbot
ADBOT LOVES YOU

Mr Shiny Pants
Nov 12, 2012

Ape Fist posted:

Visual Studio Code is not Visual Studio and does not have the support for .NET development out of the box. You have to install a bunch of helper plugins (which bug out when it looks at cshtml files because Visual Studio Code can't figure out where Razor Syntax begins and HTML ends.) as well as a bunch of other poo poo.

You can get YEOMAN to scaffold up .NET Core poo poo pretty decently and Core can be compiled via CLI but anything before Core is really just not workable outside of Visual Studio.

Relax gramps. :)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply