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
Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

TheresNoThyme posted:

Not sure if this deserves being in the OP's frameworks section, but shout-out to d3.js for being an amazing data visualization js library that has made one of my recent freelance projects much easier and more enjoyable. Once you get used to d3's concepts, esp. the idea of entry sets and exit sets, the code is easy to write and really powerful. And thanks to the OP for all the links, will definitely check out the ones I haven't seen before.

Highcharts too!

edit: You should probably mention Underscore if you're going to mention jQuery and Backbone.

Blinkz0rz fucked around with this message at 18:48 on Jun 15, 2013

Adbot
ADBOT LOVES YOU

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

I'm partial to this one:

http://slipsum.com/

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Maluco Marinero posted:

Buckle up for a wild ride through a lovely ecosystem. I started there long ago and sometimes the only decent docs you could get were a poorly narrated screen cast. Plugins are terribly maintained aside from the mainstays as well.

I don't do Drupal anymore.

This is my experience, except with Wordpress.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

fletcher posted:

I want to add some really cheesy looking glitter/confetti/fireworks or something to a webpage as a joke. Anybody got a snippet for a good one?

always include fartscroll

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

ManoliIsFat posted:

Some people hate absolutely any logic beyond tag replacements (for loops and if elses are logic). "Thin Controllers, Fat Models, Dumb Views"

It is a dumb view though. It doesn't care what poll.choice_set.all is as long as it's iterable and has a property called choice_text. You may as well write
code:
{% for k in obj %}
for all the templating engine cares.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
The PII stuff is what's going to kill you. I know whenever we deal with PII we have to follow FISMA regulations pretty closely. Log security is absolutely nuts.

Granted, we're a government contractor, so our rules are a bit stricter than private sector folks, but if you can avoid logging any PII that would make your life a million times easier.

How frequently does this issue occur? Can you figure out commonalities based on the timing? Do you have analytics on any pages that are hitting that API?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

The Dave posted:

Yeah but if you need to update a vendor script you've made more work for yourself.

Also fix your dependencies to a single version and then test against any updates.

Don't ever let anyone else (e.g. a CDN) determine what version of a dependency you're using.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

revmoo posted:

Pretty much all CMS systems can be adapted to large amounts of traffic

Except WordPress which only really scales if you throw more horsepower at it. Try load-balancing it and see what happens. Hope you don't have anything stored in the media library!

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

streetlamp posted:

HyperDB yo (and nginx, memcached, etc)
What part of WP doesn't scale as well as any other PHP CMS?

anything in wp-content

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
And what I mean by that is that there's no really good way of putting common files (i.e. user uploads) on storage that's not on the server.

Thus, you run the risk, if you're trying to load balance on AWS, for instance, of users uploading data that never gets propagated to other instances and gets wiped when the instances are pulled down.

Also there's the whole "we store absolute links in the database" thing.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

v1nce posted:

I really only did a cursory google for this, but doesn't S3 Buckets take care of that?

I don't see how this is a problem you can hope to eliminate this in any CMS.
Also are you trying to load-balance by subdomain or something? Shouldn't you be doing something like a round-robin with varnish? Bonus points for also offloading your cookies/sessions to another server.

I've seen S3 Buckets before but don't you think it's overkill to have to install a whole different filesystem just to get WordPress to store user generated file system artifacts separate from the application?

I was actually thinking about how you'd scale in AWS. Elastic Load Balancers let you spin up and shut down new instances based on load rather than having to maintain existing servers that may just go unused. If you're spinning up and shutting down servers user generated file system artifacts start to become a problem if a user uploads something on one instance but it never gets replicated across all of the instances.

All I really want is for someone to abstract WordPress's file handling so that when a user uploads something it could go anywhere and it would be up to developers to write destination plugins.

Also, next time you use WordPress take a look at the database. It actually stores the entire URL of resources in the database. To migrate from one domain to the other involves using a tool designed to do global find and replace in your database. That's pretty shoddy design, don't you think?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

down with slavery posted:

No? It's really easy to set up, and is pretty standard these days for many sites.

I've never used it. If it's as easy as you say definitely worth another look.

quote:

Why limit yourself to AWS?

'Cause that's where our infrastructure is hosted? Dynamic scaling is a thing and WordPress just doesn't place nicely with it.


I know it and use it. I just think it's absurd to have to do a global find and replace for absolute urls in a database. That's terrible design. It would be simpler if they stored urls as relative and used the site url to assemble the full url.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

enthe0s posted:

So I've come to the realization that I've been doing very modern front-end development for over a year now (just html, css, and javascript with jQuery and some Angular thrown in) and I'm now working at a .NET shop as a full-stack dev. I'm currently brushing up on my C# since I haven't touched Java for 2 years, but I'm wondering (and correct me if I'm wrong), why do people build websites with .NET when there are javascript frameworks that accomplish the same thing nowadays? I've never really looked into .NET until recently, and it seems like it's just handling the back and forth of data between client and database, which is what Angular, Backbone, Ember, etc. do.

Did I fall into a hole for a year and just find out that there are javascript frameworks that are designed to communicate with databases? You know security is a thing, right?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

an skeleton posted:

So maybe one of y'all can help me with this.

I was building a wordpress plugin that would consume a Google Spreadsheet and use that information to populate some HTML in a page. Unfortunately, the existing libraries for consuming Google spreadsheets for PHP are not really working. However, the Google Drive Client PHP API library is working, it just doesn't have spreadsheet support seemingly (and as mentioned before, the [url="https://"https://github.com/asimlqt/php-google-spreadsheet-client"]other existing library that is built on top of that[/url] for Google Spreadsheets doesn't work). So is there another way to store simple data in Google Drive and consume it? I was going to have 5-6 different columns with about 40 rows in the Spreadsheet, and its nothing super complex or long, so I was hoping there's another way other than writing a CSV file or whatever.

What is it exactly that doesn't work with the sheets library?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Data Graham posted:

For real experience from yesterday:

Finished up the main agenda of a meeting with a client, tying off a few straggling features for the back-end inventory management system for a packaging distribution company (i.e. a box factory). Dude goes, "So, let me just show you something... I'm not saying we need to do this, but I was just thinking, y'know, I'd like to start thinking of ways to show how we're fun and have a lot of personality, you know, just little interesting easter egg type things we can put in our website to just sort of, like, spice it up a little?" *pulls up youtube and types in "do the harlem shake"*


:suicide:

http://theonion.github.io/fartscroll.js/

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
I'll also add that a solid amount of the bad code you see produced is because of beginners that use tutorials written back when the mysql extension was the right way to connect to a database. The internet has a long memory and it tends to keep dumb stuff around for a long time. Modern PHP is every bit as powerful and elegant as Python even with its warts.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

fuf posted:

ugh maybe you are right. I have been pushing the hosting thing quite hard recently because I figured it would be mostly passive income, but yeah so far it's not so passive. It makes development easier though when everything is on your own servers.

Why would you think it would be passive? People make professional careers out doing that sort of thing and you're charging what, $20/mo? You're probably putting in more labor monitoring and patching your servers than you think and are probably making pennies on the hour for all of your work.

Then you have to keep up to date on security exploits and how to harden your system and god forbid you or your provider has a hardware failure because then it's a bunch of hours restoring things and there's no way your clients will pay for your system failure.

Hosting is a sucker's game. Unless you absolutely 100% have to, it's not worth the time, money, and energy. Just write your apps in a way that you can host them on Heroku or some other PaaS platform and call it a day.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Also that goes for everyone else in this thread. If you are selling hosting as a package you're either actively losing money or you're doing a terrible job maintaining your servers and it's only going to be a matter of time before someone gets into your systems.

The only way to make money on hosting is volume and if you're a freelancer, you don't have it.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

fuf posted:

My initial rationale was that I'm doing this anyway to maintain my own sites, so adding a few client sites won't make much difference. But it's getting harder to manage now.

The kind of clients I get rely on me to do everything for them, so I kind of need to offer hosting. But maybe a compromise would be to make a deal with an existing hosting company and do everything through them? I dunno.

Manage a Rackspace (or similar service) account for them.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Munkeymon posted:

Screen readers and other accessibility aids might not handle it right.

Yup, AJAX is miserable for accessibility unless you're very careful about how you make your forms and whatever feedback that you provide.

If there's ever a question about whether you have to make your site accessible or, God forbid, 508 compliant it's better to use forms and regular HTTP requests.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Amazon also has SES which is their Simple Email Service. It's specifically designed for bulk email sending.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
To be honest, to alleviate the issue you should probably find a new job. Coming from experience, if your company is unwilling to hire another person they're not going to provide you the support you need.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
90% of the stuff you might want to do with Git can be done really easily with SourceTree. It's gotten to the point where I've almost completely adopted it just because it speeds up my workflow. All of my non-technical colleagues use it as well and it's worked out for them. Highly recommended.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
I'll counter and say "who cares?" Your company is making money either way, right?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

revmoo posted:

Nah, I guess I should explain what I'm doing. I'm streaming log data from firewalls thru an hdfs cluster to a message queue that lets me grab the live firehose and filter it, and I'm displaying the raw log data in the browser using websockets. So users will see a scrolling list of logging data. The site is very lightly-colored in its default state so I want something that is clean, light, and professional. I want some semblance of a 'terminal' look but with a bit more cleanliness.

e: I just need a little more "pop" okay

Why in the world aren't you using an ELK stack?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Jabor posted:

Honestly I don't think your plan of "store keying material on developer's workstations, but not under any form of version control" is a particularly good one, both from a security and from a business continuity standpoint.

Vault basically exists for that reason

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Munkeymon posted:

haha good point.

I should have specified I'd need to use it from the client side JS

ajax call on a setTimeout?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

v1nce posted:

Listen to Lumpy; that's the play-by-play of how the app deals with users.

The business logic is in the Controller, the view logic (mostly) is in the View. The data structure is your Model. Controllers manipulate models and then shove things to the View for users to see.
Model View Controller (MVC) is the ground-floor of "separation of concerns". Your Model is re-used in all sorts of places, so it's a separate class. Your Controller and View do different things, so the point at which your Controller finishes with application logic and passes data to your view; that's a clear line in the sand between the two systems. Try not to muddy these separations.


Don't fight against your framework by trying to roll your own everything. Often you can ask yourself "surely someone has done this before?" and then hit up google and look for a friendly article or SO question.
For example; Installing Yii Users and rights in 5 steps. If you find yourself coming across code and you go "this isn't how you do it in Yii" then you should explain and make the other person learn how to do it in Yii.

Also, didn't I tell you in the other thread to use Laravel? :colbert:

I'm not sure what Yii's paradigm is but I tend to lean more towards fat models and skinny controllers. Really your models should be multi-component with a DAO and a service layer or repository.

The idea is that the controller is the transmission method for data to flow from the view to the data later and back. That way you can test your controllers in your integration tests and not worry about unit testing the whole request/response lifecycle along with your logic.

On the other side, you maintain a data object that maps to your database (ORM class or whatever you're using) and a service object or repository that does your business logic. Testing can be done on individual pieces and when testing your service/repository you can mock objects coming from the database as well as calls coming from the controller.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Oh sure, I wasn't implying he should go whole hog. I was just suggesting that if he wants to do it right, he should put his business logic in the models instead of in the controllers as was suggested.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
At a minimum run supervisord as root or a supervisor user, set the conf files to 600 and pass the env vars in the conf file for your process.

See http://supervisord.org/configuration.html

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

an skeleton posted:

Hey guys, I've got a project where I'm transitioning from MySQL to MongoDB and there's needs for:

A) Documenting the transition and how tables are being formed into various documents/subdocuments. I.e. a row from table "Locations" is now a subdocument of a "User" document

B) A general need to document the database's schema/fields

For A, I'm really not sure what to do other than to use some UML class-ish diagrams and try and make it apparent through inheritance what came from where.

For B, I have an idea as I've seen lots of API/Schema documentation but most of it was bad. For example Confluence's schema documentation seems pretty awful. Something like Twitter's API documenation is more polished but also seemingly more geared towards building a publicly consumable API in a way that is unique to twitter, so I'm not sure where my attempt should deviate from that but it probably should in a few places.

Thanks for any help.

edit: On that note, I am looking for any advice on managing medium-sized Mongo databases. For example, this app was previously being managed by Laravel's Artisan migration system. How would/should I go about managing database migrations in MongoDB?

This is stupid. Your data is relational, don't convert its structure to non-relational. If you absolutely need to combine structured and unstructured data, use Postgres's json/jsonb field type.

So mainly this:

Skandranon posted:

But now you are documenting the hell out of your schemas... so it sounds like you really wanted an SQL DB from the beginning.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

ModeSix posted:

edit: I found a thing called nTypings which apparently has superseded TSC.
https://www.npmjs.com/package/ntypescript

Jesus gently caress those version strings

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Github pages is a great option if you're just doing html and javascript.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
axios is pretty good

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Munkeymon posted:

Huh, I was thinking IntelliJ was the 'vanilla' base they added support for other languages to to make all the others.

It is, in the sense that it doesn't come preconfigured as a polyglot IDE, but all of the JetBrains plugins that comprise the language-specific IDEs are available for download for free if you have the ultimate edition.

Adbot
ADBOT LOVES YOU

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Ava is really good, too. The key benefit is that tests are run concurrently so it's stupid fast.

You can also write tests in ES2017 without config and, most importantly to me, the execution model prevents implicit global state in tests so you don't run into situations where previous tests affect the outcome of other tests.

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