[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 it possible to use Javascript for client side AND Java for
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: 74
Thread images: 3
File: Java_logo.png (7 KB, 259x259) Image search: [Google]
Java_logo.png
7 KB, 259x259
Is it possible to use Javascript for client side AND Java for server side when im building a web service? Dont want to learn PHP
>>
You can probably get just about whatever you want to work. The question you shluld be asking is why
>>
>>53642838
you're into that special kind of BDSM
>>
U should use Java on the client and js on the server
>>
>>53642923
This is the only real answer. Java plugin is the future.
>>
This is quite the standard. You can use Spring and/or Hibernate to empower your server and respond request with JSON. From there on, it's frontend JS.

Of course, you can also use the regular J2EE, but I prefer Spring.
>>
Yes, JSON RPC are quite common for webdev regardless of server side language
>>
>>53642943
not op
i've been trying to set up a restful backend and consume the services with angular; is this valid or am I completely over the top?
>>
>>53643215
valid. use JAX-RS on the server side.
>>
>>536435the onlyd oubt i have is how am i going to control user access to the webservice. JS runs on client, with a simple look at the code they can see the endpoinst and nuke them. how can i protect these endpoints?
>>
>>53643581
>>53643543
meant to quote
also, I have to use php (I know right)
>>
>>53643581
>how am i going to control user access to the webservice
the same way as any other web site. cookies.
>>
>>53643645
please don't use cookies.
web services are supposed to be stateless so you do not have a session on the server.

>>53643581
look at something like oauth or jwt.
>>
>>53642838
Yes. It's a good option, too.

Server:
* http://sparkjava.com/ if you're new to Java and/or your web service is small.
* http://www.dropwizard.io/ if you're experienced with Java.

Client:
* JavaScript with jQuery/Backbone if you're new to JavaScript.
* http://mithril.js.org/ if you're experienced with JavaScript.
>>
>>53642838
There are tons of Java frameworks like VertX
>>
>>53642838
this one is great https://www.playframework.com/
>>
>>53643745
>JavaScript with jQuery/Backbone
Plain JavaScript with jQuery/Backbone*
>>
>>53642838
Yes it is anon.

I am using Java servlets on the backend and the clusterfuck of JavaScript, Bootstrap, frontendtechs on the front. Works just fine.

I didn't use a framework on the backend because I couldn't figure out why I needed one but a lot of people recommend it.
>>
>>53642838
With GWT you can even use Java on the client!!1
>>
Try out Golang before you go full Java.
>>
>>53644044
Go is Java sans generics.
>>
>>53642838
>Java for server
You really want a slow and loaded server this much?
>>
>>53644520
Java is one of the fastest languages you can feasibly use on backend, you fucking idiot
>>
>>53645154
If by feasibly you mean for retards then sure. Otherwise you are flat out wrong.
>>
File: 1457850572551.png (356 KB, 506x662) Image search: [Google]
1457850572551.png
356 KB, 506x662
>>53645170
>>
I use js both on the client and server.
>>
>>53645154
>fucking idiot
at least he's fucking, you on the other hand..
>>
>>53645170
>>53645255
show us all those languages and frameworks used for webdev that are miles ahead of Java in terms of performance
>>
>>53645232
How do you use js on a server?
>>
>>53645341
node
>>
>>53642838
What is the more useful language to learn? Java or C++?
>>
>>53642838
>is it possible to suck a nigger dick AND take a nigger dick in the ass? Dont want to be gay
>>
>>53645443
OCaml
>>
>>53645443
Java unless games.
>>53645502
But
>no libraries
Scala's a good compromise.
>>
>>53645443
Common Lisp
>>
>>53642838
search for MEAN STACK

js
node.js
mongoDB
Angular.js
Express
>>
>>53645531
ocaml has enough(tm) libraries. it's only lacking in the scientific computing sector.
>>
>>53645594
>mongoDB
No. Node/Angular/Express is okay, but with Postgres.
>>
>>53645594
>mongoloid db
>memejs
>expressly retarded
Hello pajeet!
>>
>>53645601
How is the Unicode support?
>>
File: 1458479751369.png (170 KB, 930x436) Image search: [Google]
1458479751369.png
170 KB, 930x436
>>53645255
you have no idea what you're talking about
>>
>>53645628
Native.
>>
>>53645641
I wonder if Clojure is the fastest dynamic language available today? It must be either Clojure or Lua (via LuaJIT).
>>
>>53645641
>best, not average
>plaintext responses
>comparing frameworks to stubs
...
>>
>>53645708
opencl is significantly faster than clojure. By the way, clojure is significantly slower than java.
>>
>>53645740
>opencl
>dynamic language
What?
>>
>>53645769
I mean common lisp. Both have cl in the name, so obviously it's the same shit.
>>
>>53645214
http://asm32.info/index.cgi?page=content/0_MiniMagAsm/index.txt
>>
>>53642838
Yes but BOTH are shit.
>>
>>53645793
Is there a Common Lisp implementation called OpenCL? I haven't heard of it. But SBCL may well be faster than Clojure, yes.
>>
>>53645708
>>53645740
dunno if it's the fastest but the benchmarks I've seen are great and it's only slightly slower than Java
https://benchmarksgame.alioth.debian.org/u64q/clojure.html
>>
>>53645807
he actually did it the absolute madman
>>
godammit this thread was so good but the clueless java is slow fags had to come here and spoil everything
>>
>>53645616
sure, americanobro, call me pajeet.
But when I search for hiring jobs in my town that need mean pajeets (kek) I can choose from more than 400 that are currently hiring. While any other Gulag(Go lang) Scala, or whatever you say is non-pajeet there is almost 0 entities.
>>
>>53646120
3 rupees were deposited into your account sir. thanks for kindly do the needful.
>>
>>53646120

>sure, americanobro, call me pajeet.
>But when I search for hiring jobs in my town that need mean pajeets (kek) I can choose from more than 400 that are currently hiring. While any other Gulag(Go lang) Scala, or whatever you say is non-pajeet there is almost 0 entities.

what
>>
>>53646311
Look away, let the indian shit on his own street.
>>
WT c++ framework
>>
>>53643581
>>53643670
>>53643645

Just so you know, the REST standard is just that: a standard. There is a fair amount of sites which uses REST with cookies. Of course, the moment you're handling sessions in your server you're somehow breaking the REST, but remember that, for instance, spring security gives you a fully operational and reliable security layer cookie based. If you decide not to use it, then you're gonna need to write down all the security code being token based, included CSRF (which is easier to manage through sessions, at least for me).

The standard is there for you. The standard is there so you can use it, it's not there so it can uses you. If I remember correctly, even google uses cookies on his REST endpoints.

If you want to read a nice doc about securing Spring, then check this out: https://spring.io/blog/2015/01/12/the-login-page-angular-js-and-spring-security-part-ii
>>
>>53646624
wow, thanks a lot!
>>
as for java
anyone have any advice for oracle certificates?
>>
>>53646682
My coworker/senior/senpai did take the test in the past and failed (he said it was because he didn't prepare himself very well and the test was like a language proficiency test). He received a training from IBM when he was hired (by IBM) and he's the person who knows most about programming I ever know.
He told me that you need to study lots of data structures and weird operators. The test himself it's not hard, but shitty (as a language proficiency test).
>>
>>53642838
There's literally a 100 different frameworks built for just that exact purpose.
>>
>>53646798
im planning to take it too, i want to prepare myself and looking for some advice
>>
>>53646843
Then memorize all the operators and practice a lot of data structures. He don't remember that much about the test, but that's what he told me when I was an intern.
>>
>>53645214
FUCK ALL THIS!

I built a webservice using CGI and C!!!
With structures and mysql database

IN FUCKING C (well I learned a lot about pointers and FUCKING FREEING YOUR MEMORY and not leaving death memory behind (clean up after malloc())).
It was kinda nasty at first, but the I got into it. The only problem: others can't read it (although I commented almost every important line) or don't want to learn C.

---BUT THE MOST IMPORTANT FACT---
If I'd redo the project, I'd use PHP/other easy scripting language
>>
>>53646871
Doesn't*.
>>
>>53646930
>If I'd redo the project, I'd use PHP/other easy scripting language
please don't. PHP is an abomination. VM languages like Java, C# or Scala are much more pleasant to write in, easier to maintain and not that much slower than C
>>
>>53645443
C
>>
>>53646930
>I built a webservice using CGI and C!!!
what does it do?
>>
>>53648473
display messages, log in log out, pasword hashed + salted --> database
only specific people who login can write messages.
Sort messages, display messages in categories, let users choose which categories to track.
>>
>>53646930

You say that like it's a big deal. Maybe if you went to college you fucking NEET then you'd realize that everyone with a comp sci degree from a decent school has made a server in C.
>>
>>53645594
> node.js
Node is super fucking slow for anything other than just serving data from a database. In any case, it's gonna get BTFO'd by Golang, which is also "non-blocking IO + single thread" but better in every way and also has a decent community instead of the community of fucktards that Node.js has.

>Express
In case Node.js wasn't easy enough, this'll make it even easier.

> mongoDB
Complete meme. Most people who use NoSQL should actually be using a relational database (Postgres is good and has a decent Node.js adapter). If this is the first database you ever use then you're not ready to do what you're doing yet.

> Angular.js
Decent.
>>
I highly recommend jhipster if you start out from scratch. It shows you the most hip way to do what you want in java and you will learn about many amazing java technologies.

jhipster basically just helps you setup your project. You will be using:
- spring boot
- hibernate
- angularjs
- and many more options depending on your choices.

Also everything is ready to be deployed in the cloud e.g. as docker container (spring boot helps there).

this video might help: https://www.youtube.com/watch?v=baVOGuFIe9M
Thread replies: 74
Thread images: 3

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.