What are the pros and cons of plain PHP or Classic ASP?
PHP and Classic ASP are server-side scripting languages. What is wrong with having a website written in this instead of the trendy JavaScript Frameworks like React, Angular etc.? If memory serves me correctly, there is an issue with security where you can post in a text box some script and hack into a system.
Can we please discuss some pitfalls or drawbacks to having a website written entirely in PHP or ASP? What does a JavaScript framework or Node.js bring to the table that would otherwise be lacking?
I am just now venturing into a contract where I am tasked with updating and maintaining existing code. All I know right now is that it is written in PHP and Classic ASP. I am in the process of investigating these scripting languages and I want to know what the opinion of other developers are.
Related
MySQL Developer Essentials with PHP, Java and .NET in JavaOne & Oracle Develop Conference 2011 to be held in Hyderabad in the month of May………….
The presentation will provide an overview of the resources available to MySQL developers in the three most popular programming languages. Including the core supported drivers and advanced features, as well as how the MySQL connectors can be used with MySQL Enterprise Monitor and Query Analyzer to help developers trace the source of a problematic query. You'll also see code examples for PHP, Java, and .NET and a live demo during the session.
I have once attended ADF Methodology conference. One comment I would like to make from having been involved in paper selection, there weren't as many papers from non-Oracle people on ADF or JDeveloper as we would have hoped. I would urge any of you who are using ADF to attend such conference. You can learn about "the big picture of why you chose ADF" or you might want to focus on a topic close to your area of work or just "my experiences with JDeveloper".
Its valuable for the community to know of real world experiences, good
and bad. So go for it and share your ideas post the conference.
Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?
Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.
nikwen said:
Every programming language has advantages and disadvantages. For example Java is portable but slower then, let's say, C++. C++ is less portable and needs to be compiled seperately for every OS but it's faster. Python is very easy and very portable but it's slower then Java. Html, Javascript and Go are for websites. PHP is designed for the use with databases. Prolog uses a completely different approach and is good for logical stuff.
You see, (almost) every language has its own field of application. Additionally, everyone has a favorite language for whatever reasons (e.g. because he thinks the code is pretty). So it's a matter of taste as well.
Click to expand...
Click to collapse
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?
Blakebn2012 said:
Thanks for the high quality response.
As a beginner, someone who wants to start developing android applications..What coding language do you think I should start with? I understand android is basically Java?
Click to expand...
Click to collapse
Well, it's Java with some extra stuff. That's why I would recommend starting with Java. It's portable, object oriented and you'll need it for Android later anyway.
When I learned Java, I used the Head First Java book which I can highly recommend.
Ok thank you very much you have been a great help.
Blakebn2012 said:
Ok thank you very much you have been a great help.
Click to expand...
Click to collapse
You're welcome.
There's different languages for different things, like Java vs. C++ (Java is portable/cross-platform, pure object-oriented, has automatic garbage collection, etc; C++ is platform dependent and needs to be compiled on each environment, wasn't built from the ground up as OO, you need to allocate and manage memory yourself, etc. Java isn't quite as fast/efficient as C++ but it's come a long way from it's beginnings and is pretty close now, for desktop apps IMO anyway.
Then, for web development, there's Python and PHP. Both accomplish the same thing (doing back-end logic for websites, like querying databases so the data can be displayed on the page) but have different syntax. People like either one for different reasons and it's mainly just personal preference when it comes down to those.
So to answer your question, the difference between some languages is pretty great (like assembly and C#) and they're used for different purposes. And the difference between others, like PHP and Python, is for the most part superficial and it's just personal preference between the two.
The main reason we do have programming languages is that working directly on the bare hardware is pretty difficult. Working directly with machine code is difficult in many ways: it is hard to be kept bugfree, even harder to be read and understood, and there is also the problem that it's only working on a specific machine. Programming languages cope with those problems by introducing programming paradigms, which make several things easier, but it turned out that there is no paradigm which covers all needs. C/C++ for instance makes it possible to work pretty close to the machine while producing quite readable code, which can be ported easily from one plattform to another (compared to using assembly language). In contrast Java introduces a Virtual Machine on top of the actual system such that it's even a lot easier run code across several systems (compile it on one machine, run it everywhere ... as long as a JVM is available), and it brings the object oriented paradigm with it. Furthermore there are declarative languages for database programming, functional programming languages or logical programming languages for mathematical problems around, and so on ... . Sometimes you might not be interested in writing understandable portable code, such that assembly language is your best pet, but that's most probably not true in most situations.
123123132
Really good compact responses. I also want to recommend learning some shell programming, i.e. linux terminal programming for file/process management and low-level hardware manipulation in the kernel. Shells are usually mksh, zsh, bash, busybox ash, or symbolically linked to sh. This is known as a scripting language because you can run your programs/scripts on-the-fly without any compiling. Adding some shell scripts to your java app can make it very powerful such as with apps like trickster, synapse, performance control, etc., .. basically any kernel/hardware control apps.
Also you can try Ruby language. Its great for some everyday tasks, very simple and powerful(especially string processing). Also Ruby On Rails is very simple framework for web-developing. A week and you can try to code your own github. And the IRB console is good enough. But i duuno, is there any mobile-app-dev modifications of Ruby. Anyway, its still great enough.
Blakebn2012 said:
Hi guys, can anyone explain to me why you can have different coding languages? I am going to try and explain it the best way possible. Pretty much I want to know why some people use other coding languages instead of others? Are some better for particular activities? Like I know cross compatibility like you can't use html to code a game online you need to use Flash or Javascript etc.
tl;d why use one language over another?
Click to expand...
Click to collapse
That would be perfect, if we lived in a place where only one language is enough for all works XD
However, the really life isn't perfect.
Some works need complicated language to achieve and some don't.
Note to mods: this thread might be worth pinning! Using modern languages could highly improve code quality of Android apps.
OK, if you want native code, you can stick to C or C++, as you probably know interfacing native code with Java via JNI is neither pretty nor easy. But what about languages that compile to JVM (Dalvik/ART in Android case) that allow us to use tens of thousands of available java libraries in our projects? Java is quite nice but it's missing a lot of hot concepts available in modern languages like functional programming, duck typing and pattern matching. And as soon as you start using other JVM languages you'll discover Java is also extremely... verbose! I could use 5 Scala lines of code to do the same things I did in 50 lines of Java...
Note also that almost all of below languages handle null in a way much more civilized than Java. While in Java you would do:
Code:
if(someValue != null && someValue.someProperty!=null && someValue.someProperty.interestingString != null) doSomething(someValue.someProperty.interestingText)
In modern language you would just do:
Code:
doSomething(someValue?.someProperty?.interestingString)
Nice, eh?
And do believe me, these languages mix wonderfuly with Android API. Once you start coding in them, you won't come back to Java. Note that all of them have Android Studio plugins, that make the coding experience as easy as clicking "Install Plugin"!
So, let's start with the king:
Scala
Website: link
Getting started: link
Scala for Java developers: link
Why was it invented: Technically, Scala is a blend of object-oriented and functional programming concepts in a statically typed language. The fusion of object-oriented and functional programming shows up in many different aspects of Scala; it is probably more pervasive than in any other widely used language. The two programming styles have complementary strengths when it comes to scalability. Scala’s functional programming constructs make it easy to build interesting things quickly from simple parts. Its object-oriented constructs make it easy to structure larger systems and to adapt them to new demands. The combination of both styles in Scala makes it possible to express new kinds of programming patterns and component abstractions. It also leads to a legible and concise programming style.
A real beast of a language, I'm reading a fifth book on Scala right now, I have read tens of blog posts and I have a feeling like I haven't even scratched surface of it, although I've already incorporated Scala code into my XenoAmp project. If you're familiar with functional programming, you'll feel at home with Scala.
Let me rephrase the above paragraph: you PAINLESSLY incorporate below languages into your current project, without converting a single existing line! You just create new file that has extension different than .java!
Things like function literals, tuples, pattern matching and surprisingly flexible syntax of the language allow to create... a language within language, note very nice Scala/Android UI library named Scaloid and how it maintains its own minimal animation-only sub-language called Snails!
Scaloid activity layout example
Also read a blog post here about how can you write a clean code like this (note: NO SEMICOLONS!!! ):
Code:
Scala
findView[Button](R.id.button).onClick { view : View =>
Toast.makeText(this, "You have clicked the button", Toast.LENGTH_LONG).show()
}
instead of this:
Code:
Java
Button v= (Button) findViewById(R.id.button);
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(this, "You have clicked the button", Toast.LENGTH_LONG).show();
}
});
Kotlin
Website: link
Getting started: link
Kotlin for Java developers: link
Why was it invented:
to create a Java-compatible language,
that compiles at least as fast as Java,
make it safer than Java, i.e. statically check for common pitfalls such as null pointer dereference,
make it more concise than Java by supporting variable type inference, higher-order functions (closures), extension functions, mixins and first-class delegation, etc;
and, keeping the useful level of expressiveness (see above), make it way simpler than the most mature competitor – Scala.
A language created by creators of IntelliJ Idea (base of AndroidStudio), with Android in mind. It's also functional, syntax based on Scala syntax, but much simplier and easier to learn. Also has a tool to convert your Java code to Kotlin! So if you want to start using all hip goodies like functional programmin, patter matching, nullable expressions and operators - this is a place to start without feeling overwhelmed (by Scala)
Read what Jake Wharton (the one behind NineOldAndroids and ActionBarSherlock) thinks about Kotlin: https://docs.google.com/document/d/...bEhCqTt29hG8P44aA9W0DM8/edit?hl=pl&forcehl=1#
Ceylon
Website: link
Getting started: couldn't find a good primer, but you could figure it yourself
Ceylon for Java developers: link
Why was it invented:
to be easy to learn and understand for Java and C# developers,
to eliminate some of Java’s verbosity, while retaining its readability,
to improve upon Java's typesafety,
to provide a declarative syntax for expressing hierarchical information like user interface definition, externalized data, and system configuration, thereby eliminating Java's dependence upon XML,
to support and encourage a more “functional” style of programming with immutable objects and higher-order functions,
to provide great support for meta-programming, thus making it easier to write frameworks, and
to provide built-in modularity.
Supposedly more powerful than Kotlin, with better syntax for lambdas (function literals).
I might write a bit more about each language as soon as I start using them, so stay tuned. And share your experience with alternatives in this thread!
Gosu
Website: http://gosu-lang.github.io
Getting started: http://gosu-lang.github.io/docs.html
Its most notable feature is its Open Type System API, which allows the language to be easily extended to provide compile-time checking for things that would typically be dynamically checked at runtime in many other languages. [Wikipedia] Doesn't seem to have functional programming capabilities.
Groovy
to be continued
Hi I'm a student i have this weard teacher that gave a project about making application i have no back ground on PHP language and she want me make a Mysql php Databes ...Please if any of you knows how to program a PHP language help me ..its only easy for you to do it because its only a lite Program...it's only a simple app with not much more database ...just email me in [email protected] ..thanks..
Please Pro-Programmers help me...some day ill be just like you a professional programmers but now i needed to pass this course
Next semester i will enroll in a class that teaches PHP language so that i'm not struggling to make an app that needed PHP coding ....
PHP is not the language to jump straight into if you have had no experience at all. Getting a grasp of the basic programming concepts might be easier in a language such as Visual Basic as the syntax and concepts in PHP might be quite confusing for a beginner. If you have no experience in scripting, I might also suggest taking a look at JavaScript which is a client-side scripting language, making it limited when compared to PHP. But don’t let that scare you, PHP teaches some great coding habits and if you are capable of picking things up quickly then you should be just fine. Let’s take a little look at the syntax first, here’s how you would create your first PHP language programme:-
http://howtostartprogramming.com/PHP/
I'm developing an app for iOS and android that identifies songs. We have a matching engine in c++ that works well, but my question is about the rest of the app. We have a user interface design that allows the user to record, match and save, as well as share, edit, and see their recordings.
I'm not a coder - just a designer- and I'm getting conflicting advice about how to implement. One person wants to do the majority of the functions in c++ with just a thin native GUI skin, while the other says we should write in native IOS (swift) and Android and only have the engine in c++.
The argument for c++ is it will be a single code base to maintain - it would include doing the sharing, storing history, displaying sonograms, etc. The argument against is that in fact it will not be easier to maintain, and will also create a lot of problems making calls, for example, between the interface and the function modules. For example, we currently have a function for sharing (email, facebook etc) entirely in C++ which the interface calls to, and I'm not sure if that's the best way to do things.
Hope this is clear - it's a very hard thing for me to assess as ignorant as I am! Any advice would be greatly appreciated.
I'd have the engine being c++ only, and then code in the native language for the specific platform.
Here is why:
-Maintaining UI design in c++ is terrible, which can be bad for potential customers
-Not good for load times, you want your app to be as fast as possible
-While it is good for future support (one dev can handle both the engine and the UI, less devs = less spent money), leaving it all on one dev can; have terrible documentation for the code, which will make it harder for new recruits to begin.
-IDE support (no I am not joking), android studio can do the UI pretty darn good, and adding c++ will just make it either look old or ugly.
Those are just my 2 cents