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
Anony Mouse
Jan 30, 2005

A name means nothing on the battlefield. After a week, no one has a name.
Lipstick Apathy

Cugel the Clever posted:

Our designer handed us something I did not realize would be a problem until I got down to actually trying to make it work. The page masthead should be able to have an image on the right that is cut at a 30° angle and extends past the masthead into the nav. Mockup:

I've been unable to figure out how to achieve this—first tried a skewed wrapper with overflow hidden and the image counter-skewed, but the clipping didn't come out right and there was no way to allow the client to specify what area of the image they want to appear in the unclipped portion. Worse, the masthead should theoretically expand as they overfill the intro text, revealing more of the image and the image comes to a point with another angle back toward the right-hand side.

Has anyone got experience doing something like this before? Any insights to offer?
Isn't the image going to look awful once they start scrolling and the navbar and masthead aren't aligned? I would say to just bake it into the background image or whatever. Barring that there are a few ways I can think to do it: CSS transform: rotate() being the most obvious and probably easiest, followed by prebuilt transparent PNG layers and finally SVG (you don't even need clipping really, just clever positioning).

Edit: specifically, just rotate an outer div by 30 degrees and then counter-rotate its inner content to compensate. Use other containers to box everything in to the right shape or whatever. https://jsfiddle.net/abewcs3b/

Anony Mouse fucked around with this message at 00:21 on Jul 15, 2016

Adbot
ADBOT LOVES YOU

Forgall
Oct 16, 2012

by Azathoth

Scaramouche posted:

for once an Amazon product does what it says mostly on the tin.
As opposed to what?

Thom ZombieForm
Oct 29, 2010

I will eat you alive
I will eat you alive
I will eat you alive
Forgive me for asking a "what framework do I use" question. I've been tasked with creating a web app that allows users to input, modify, and delete tickets. The current method used is an excel spreadsheet. This is an internship, and so whether or not what I create is actually used in the long-term or at all is questionable. Anyways, I created a usable lightswitch application which works. I am interested (for my own benefit, I don't know how to use any of these frameworks yet ) in going a step further on my own and learning how to implement the same thing with react angular knockout or something, but then there is hey do I use angular one or two, etc. are these overkill etc...

I just began a angular 1 tutorial, any suggestions?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Thom ZombieForm posted:

Forgive me for asking a "what framework do I use" question. I've been tasked with creating a web app that allows users to input, modify, and delete tickets. The current method used is an excel spreadsheet. This is an internship, and so whether or not what I create is actually used in the long-term or at all is questionable. Anyways, I created a usable lightswitch application which works. I am interested (for my own benefit, I don't know how to use any of these frameworks yet ) in going a step further on my own and learning how to implement the same thing with react angular knockout or something, but then there is hey do I use angular one or two, etc. are these overkill etc...

I just began a angular 1 tutorial, any suggestions?

Django + Django Rest Framework for the backend with react frontend is fun!

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Thom ZombieForm posted:

Forgive me for asking a "what framework do I use" question. I've been tasked with creating a web app that allows users to input, modify, and delete tickets. The current method used is an excel spreadsheet. This is an internship, and so whether or not what I create is actually used in the long-term or at all is questionable. Anyways, I created a usable lightswitch application which works. I am interested (for my own benefit, I don't know how to use any of these frameworks yet ) in going a step further on my own and learning how to implement the same thing with react angular knockout or something, but then there is hey do I use angular one or two, etc. are these overkill etc...

I just began a angular 1 tutorial, any suggestions?

Angular 1 is a pretty good choice for this, it was initially geared towards very quickly making CRUD Single Page Applications. Angular 2 is good as well, though has a bit steeper learning curve (TypeScript, ES6, etc).

Take a look at both these style guide, should help a lot in terms of showing examples of good Angular structure.

https://github.com/johnpapa/angular-styleguide
https://github.com/toddmotto/angular-styleguide

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fletcher posted:

Django + Django Rest Framework for the backend with react frontend is fun!

Seconding this. :same:

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Django + DRF is a good combo. However, in the interest of professional development, I've got a question:

What's something else to use besides Django + DRF that is interesting to work with...maybe with different paradigms?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Thermopyle posted:

Django + DRF is a good combo. However, in the interest of professional development, I've got a question:

What's something else to use besides Django + DRF that is interesting to work with...maybe with different paradigms?

Firebase is good to work with, you can do pretty much everything (hosting, CDN, data, user uploaded files) without any significant back-end development, with Angular/React/whatever on frontend.

Calidus
Oct 31, 2011

Stand back I'm going to try science!
I have a internal .net business application, that I would like to transform into a web application. I have managed to strip out all the business logic into a single self contained dll. The business logic is basically just a number functions manipulate and fill a 3d space that is is modeled with a complex class. I have created a couple basic CRUD apps with ASP.NET MVC and some ugly jquery over the last few years but nothing serious. Porting the business logic sounds painful. A basic level I write a web service to manage the state of the model. Each session gets a single model. Then create a website to consume that service. Is this a reasonable way to go about this? How would I know if I need a JS framework beyond some basic JQuery?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Calidus posted:

I have a internal .net business application, that I would like to transform into a web application. I have managed to strip out all the business logic into a single self contained dll. The business logic is basically just a number functions manipulate and fill a 3d space that is is modeled with a complex class. I have created a couple basic CRUD apps with ASP.NET MVC and some ugly jquery over the last few years but nothing serious. Porting the business logic sounds painful. A basic level I write a web service to manage the state of the model. Each session gets a single model. Then create a website to consume that service. Is this a reasonable way to go about this? How would I know if I need a JS framework beyond some basic JQuery?

You'd want a web framework if your UI is anything more complicated than some static pages with forms on them. If you want to make a single page application, for example.

If all you want to give your users is a form to fill out with a file upload section that spits out a transformed file as a download, you can do all of that in ASP MVC without ever touching JS for anything.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

This is pretty weird. We're setting up a wholesaler version of the site with reduced pricing, special inventory upload/download, etc.

So's I install a basic wordpress site in a sub folder /wholesale
Then I go into the hosting setup and add a sub-domain, wholesale.ourdomain.com and point it to the /wholesale folder

When I visit wholesale.ourdomain.com I get a totally different page, somehow pulled from the front page crosspromonetwork.com:

quote:

What is a Cross Promotion?
Cross pro-mo-tion: noun; The cooperative marketing by two or more companies of each other's products/services.

A well-known example of a cross promotion is Disney and McDonald's Happy Meal toys.

(etc etc a shady offer/sign up sheet later)

Eventually, the dns updates, and I get redirected to the home page of ourdomain.com because I need to modify .htaccess to allow for the sub-domain.

But what the hell happened in that 5-10 minutes inbetween? Shady deal for unresolved subdomains by our host? I tried a random string (asdfasd.ourdomain.com) and that properly 404d, same with sales. or promotions.

MrMoo
Sep 14, 2000

I presume some kind of propagation delay between the DNS and web configurations that ends up pointing somewhere strange.

Golbez
Oct 9, 2002

1 2 3!
If you want to take a shot at me get in line, line
1 2 3!
Baby, I've had all my shots and I'm fine
We currently use a Java applet to allow customers to bulk upload files; sometimes as many as 4000. But Java support is going away, so we want an HTML [and possibly Javascript] solution. But we've run into a pretty arcane issue: IE and Chrome appear to have a 32k limit to the total size of filenames. (reference: http://stackoverflow.com/questions/15851751/what-is-the-max-number-of-files-to-select-in-an-html5-multiple-file-input) So we're running out of space around 500 files.

There appears to be no way around this for IE, and this is a requirement for the site; blame the state. Does anyone know of an uploader that can handle a large amount of files, and do it synchronously rather than async, since we need to keep them all in one place on the server and run a process on them all after they're done uploading?

MisterZimbu
Mar 13, 2006

Golbez posted:

We currently use a Java applet to allow customers to bulk upload files; sometimes as many as 4000. But Java support is going away, so we want an HTML [and possibly Javascript] solution. But we've run into a pretty arcane issue: IE and Chrome appear to have a 32k limit to the total size of filenames. (reference: http://stackoverflow.com/questions/15851751/what-is-the-max-number-of-files-to-select-in-an-html5-multiple-file-input) So we're running out of space around 500 files.

There appears to be no way around this for IE, and this is a requirement for the site; blame the state. Does anyone know of an uploader that can handle a large amount of files, and do it synchronously rather than async, since we need to keep them all in one place on the server and run a process on them all after they're done uploading?

Does it make sense at this point to just allow them to upload an archive with multiple files if they want that many processed at once?

Golbez
Oct 9, 2002

1 2 3!
If you want to take a shot at me get in line, line
1 2 3!
Baby, I've had all my shots and I'm fine
Ask hospitals to zip up files? Are you mad, we're lucky they use the Internet at all instead of pack mules. Nope, the state would never allow us to make that requirement. :sigh:

Edit: A friend pointed out the drag-and-drop API might be different from the <input type="file"> interface, and sure enough, that works, but a lot more work is needed to see if it fits into our batch method. Still, that's the best chance we have. Thanks gerb!

Golbez fucked around with this message at 21:17 on Jul 20, 2016

darthbob88
Oct 13, 2011

YOSPOS
What's a good way, particularly modal- and Bootstrap-compatible, to do an editable dropdown input? My current best idea is a simple datalist, if only because it's supported natively by most browsers, but my boss wants that dropdown arrow to stay on the input, it should be a select box that you can add new answers to. He likes jQuery Autocomplete, but it caused issues on our modal dialog, and I'm hesitant to rely on more libraries than necessary. And yes, I know we shouldn't be using modal dialogs, they're going away soon enough.

ETA: Found and am using Selectize. Seems adequate so far.

darthbob88 fucked around with this message at 16:53 on Jul 21, 2016

nexus6
Sep 2, 2011

If only you could see what I've seen with your eyes
In our team we use Git to manage more than one person working on a site's code but we're looking for a way to manage a site's database when more than one person is making changes. Our current 'solution' is to use a shared remote database hosted on Amazon RDS but the latency is horrendous: taking anywhere between 4 - 30 seconds to load pages. When you're making a bunch of changes it can take hours to do any work.

Are there better alternatives? We're all currently using virtual machines with Vagrant - is there a way we can connect to each others' machines that way for a more local shared database?

chippy
Aug 16, 2006

OK I DON'T GET IT

Golbez posted:

We currently use a Java applet to allow customers to bulk upload files; sometimes as many as 4000. But Java support is going away, so we want an HTML [and possibly Javascript] solution. But we've run into a pretty arcane issue: IE and Chrome appear to have a 32k limit to the total size of filenames. (reference: http://stackoverflow.com/questions/15851751/what-is-the-max-number-of-files-to-select-in-an-html5-multiple-file-input) So we're running out of space around 500 files.

There appears to be no way around this for IE, and this is a requirement for the site; blame the state. Does anyone know of an uploader that can handle a large amount of files, and do it synchronously rather than async, since we need to keep them all in one place on the server and run a process on them all after they're done uploading?

Might this be useful to you?

http://www.dropzonejs.com/

It's very easy to implement and quite configurable. I've used it to build a single page, AJAX-y photo uploading and cropping tool to great success.

I'm not sure about file size limits, etc. though.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

nexus6 posted:

In our team we use Git to manage more than one person working on a site's code but we're looking for a way to manage a site's database when more than one person is making changes. Our current 'solution' is to use a shared remote database hosted on Amazon RDS but the latency is horrendous: taking anywhere between 4 - 30 seconds to load pages. When you're making a bunch of changes it can take hours to do any work.

Are there better alternatives? We're all currently using virtual machines with Vagrant - is there a way we can connect to each others' machines that way for a more local shared database?

http://www.liquibase.org/ check in the schema with your code, every dev can make changes and push. On startup your application applies the new changesets and now your db and app are in sync on every env.

Dren
Jan 5, 2001

Pillbug
When apache is configured as a reverse proxy for SSL with servlets or something behind it is there a way to prevent apache from being able to mitm everything? If not, is there a way to set things up so that all the traffic flows through port 443 but the servlets are the endpoints for https?

I'm concerned that if apache is owned my whole app is owned. Is there any reading I can do?

MrMoo
Sep 14, 2000

You need straight TCP forwarding which is easier in something like HAProxy.

Dren
Jan 5, 2001

Pillbug

MrMoo posted:

You need straight TCP forwarding which is easier in something like HAProxy.

thanks I think I came up with a workable idea, just gotta figure out if HAProxy will support it

stoops
Jun 11, 2001
I need some recommendations on some text editing software.

I mainly code in php and I tend to use Dreamweaver and Notepad++.

Dreamweaver mostly because it has the file directory on the side and i can upload on save.

Is there any text editors that can do the same, that kind of has Dreamweaver's, explorer-tree, view?

I've looked at Sublime and it just doesn't have it the way I want it.

The problem is, Dreamweaver uses tabs instead of spaces, so when another person on my team opens my code, the code looks whack.

The other person on my team is more linux based, so he uses whatever text editor is on his console. I'm still new to linux commands so I'm trying to find something in the meantime.

Thanks for any recommendation.

kedo
Nov 27, 2007

stoops posted:

I need some recommendations on some text editing software.

I mainly code in php and I tend to use Dreamweaver and Notepad++.

Dreamweaver mostly because it has the file directory on the side and i can upload on save.

Is there any text editors that can do the same, that kind of has Dreamweaver's, explorer-tree, view?

I've looked at Sublime and it just doesn't have it the way I want it.

The problem is, Dreamweaver uses tabs instead of spaces, so when another person on my team opens my code, the code looks whack.

The other person on my team is more linux based, so he uses whatever text editor is on his console. I'm still new to linux commands so I'm trying to find something in the meantime.

Thanks for any recommendation.

There's a huge section about this in the OP. I have no idea what Dreamweaver's "explorer tree" view is but I'd hazard a guess that it's probably something you should learn to do without.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

stoops posted:

I need some recommendations on some text editing software.

I mainly code in php and I tend to use Dreamweaver and Notepad++.

Dreamweaver mostly because it has the file directory on the side and i can upload on save.

Is there any text editors that can do the same, that kind of has Dreamweaver's, explorer-tree, view?

I've looked at Sublime and it just doesn't have it the way I want it.

The problem is, Dreamweaver uses tabs instead of spaces, so when another person on my team opens my code, the code looks whack.

The other person on my team is more linux based, so he uses whatever text editor is on his console. I'm still new to linux commands so I'm trying to find something in the meantime.

Thanks for any recommendation.

Microsoft (*gasp*) Visual Code is actually pretty nice: https://code.visualstudio.com/

Or, just bite the bullet and learn vim :v:

chippy
Aug 16, 2006

OK I DON'T GET IT

stoops posted:

I need some recommendations on some text editing software.

I mainly code in php and I tend to use Dreamweaver and Notepad++.

Dreamweaver mostly because it has the file directory on the side and i can upload on save.

Is there any text editors that can do the same, that kind of has Dreamweaver's, explorer-tree, view?

I've looked at Sublime and it just doesn't have it the way I want it.

The problem is, Dreamweaver uses tabs instead of spaces, so when another person on my team opens my code, the code looks whack.

The other person on my team is more linux based, so he uses whatever text editor is on his console. I'm still new to linux commands so I'm trying to find something in the meantime.

Thanks for any recommendation.

All the PHP guys where I work seem to love Brackets (http://brackets.io/). That has an explorer tree sidebar thingy.

Depressing Box
Jun 27, 2010

Half-price sideshow.

stoops posted:

I need some recommendations on some text editing software.

[...]

I'll throw in a recommendation for PhpStorm, my go-to IDE. I use it alongside a code editor for quick edits and edge cases (I use Sublime Text for that, but Visual Code/Brackets/Atom/etc. should all work too).

The Fool
Oct 16, 2003


Atom (http://atom.io) has an explorer sidebar, and I believe has a plugin that adds ftp/sftp support

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I use Textpad linked to WinSCP for ftp functionality. Make sure you get the PHP syntax highlighter thinger going

kedo
Nov 27, 2007

I use a secretary who takes dictation.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

I use a secretary who takes dictation.

But is (s)he typing what you say directly into a terminal SSHed into the production server?

kedo
Nov 27, 2007

She's hand coding responses to HTTP requests as they come in at a blistering 100 WPM.

ModeSix
Mar 14, 2009

kedo posted:

She's hand coding responses to HTTP requests as they come in at a blistering 100 WPM.

Must be a low traffic site. :v:

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
I just got a second interview but the woman asked me to write something in Symfony, a framework I've never used and barely even heard of.

I know it's well documented and has great learning tools, but I'm kinda clueless on what I should even write

nexus6
Sep 2, 2011

If only you could see what I've seen with your eyes

Depressing Box posted:

I'll throw in a recommendation for PhpStorm, my go-to IDE. I use it alongside a code editor for quick edits and edge cases (I use Sublime Text for that, but Visual Code/Brackets/Atom/etc. should all work too).

Seconding PHPStorm. Once I got a license I never looked back.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Grump posted:

I just got a second interview but the woman asked me to write something in Symfony, a framework I've never used and barely even heard of.

I know it's well documented and has great learning tools, but I'm kinda clueless on what I should even write

Fizz Buzz but do Fartes Buttes instead.

Arcaire
Jun 30, 2016
Been out of the webdev game for a few years (so like thirty decades in tech years) because security work, is this "javascript-built-frontend" malarkey the actual go-to now? I browse HackerNews perhaps a bit too much for my own good and everyone is hydroplaning on each others' tears over literally any choice of technology that isn't AngularJS frontend + Go backend. What happened to things like Rails/Django? Is Phoenix just a meme?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Arcaire posted:

Been out of the webdev game for a few years (so like thirty decades in tech years) because security work, is this "javascript-built-frontend" malarkey the actual go-to now? I browse HackerNews perhaps a bit too much for my own good and everyone is hydroplaning on each others' tears over literally any choice of technology that isn't AngularJS frontend + Go backend. What happened to things like Rails/Django? Is Phoenix just a meme?

Short answer, yes.

Long answer, it depends. Having your web application take place mostly within the browser allows for a lot more responsive applications, as well as a better way to conceptualize your whole system. A web app is no longer this fuzzy hybrid of server and HTML, it is a much more explicit client side application which communicates with one or more backend servers.

Data Graham
Dec 28, 2009

📈📊🍪😋



On that note, does anyone have any experience with making JSP/JSTL play nice with the modern webapp topology, i.e. instead of server-rendered pages, API endpoints serving structured JSON data for consumption by front-end JS?

I'm kinda forced to use JSP in a certain project and for the life of me I don't see a good way of doing JSON views out of the box. JSP makes you do your SQL queries in <sql:query> blocks, but JSON can only be generated by raw Java beans or scriptlets, and you can't pass complex structures (like query results) back and forth between JSTL and scriptlets (you have to explicitly <c:set> every single one-off variable as an attribute in the pageContext, and then retrieve each one explicitly into the scriptlet). Like this:

code:
<sql:query var="qryWidgets">
SELECT id,name,cost FROM widgets
</sql:query>

<c:forEach var="widget" items="${qryWidgets.rows}">
    <c:set var="widgetId" value="${artist.artistid}" />
    <c:set var="widgetName" value="${artist.artistname}" />
    ... etc ...

    <%
        int widgetId = Integer.parseInt(pageContext.getAttribute("widgetId").toString().trim());
        String widgetName = pageContext.getAttribute("widgetName").toString();

        // Do some poo poo here with these variables, like add them to a structure you can spit out later using Gson or something
    %>

</c:forEach>
It makes me want to die; nothing should be this obtuse in tyool 2016.

I feel like there ought to be a way to do SQL queries within the scriptlet portion, but scriptlets don't inherit anything from the page scope automatically, like the DB connection, so you have to explicitly set it up and create a new Connection object and so on for every one. It's a nightmare.

I've gotten to the point where I feel like I can make just about any back-end engine behave nicely with modern client-side-heavy apps; hell, I've even got a nice set of techniques and libraries for making ColdFusion do this poo poo. But I'm flummoxed by how backward JSP is.


Fake edit:

quote:

If you write a classic web app, you might need a view component. One of the first of its kind was JSP.

While still powerful and fully supported by Struts, people might prefer other technologies like Velocity and Freemarker. Both are also first class citizens for Struts.

All have in common that you would start writing HTML markup and add dynamic features using JSP tags (same goes for Velocity and Freemarker). While it is not recommended, JSP even supports adding plain Java to the markup. Reading about the JSTL or, even better, the Unified expression language is recommended.

That said, you can easily access your data model from the view. And render it appropriate. If you would like to use a more modern approach, you will love to hear Struts 2 provides features to return JSON, which usually fuels AJAX driven webpages. With that it is easily possible to use jQuery or AngularJS as a front end layer and even completely discard JSP.

Well I guess that answers that?

Adbot
ADBOT LOVES YOU

bartkusa
Sep 25, 2005

Air, Fire, Earth, Hope
We have a monolithic server that used to render JSPs. Now it's a monolithic server that mostly returns JSON.

The JSPs aren't doing anything for you. Just use Gson or something to convert POJOs to JSON, then dump the string into the response. Template languages cannot help you.

If you have to return an object graph or circular references or poo poo, idk what you do. We have something proprietary to do that, but I'm sure there's some modern open-source solution.

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