Showing posts with label Integrated development environment. Show all posts
Showing posts with label Integrated development environment. Show all posts

20 March, 2014

My bet on Java IDE

intellij-shop
intellij-shop (Photo credit: dibau_naum_h)
20-Mar-2014

I have been spending some time on learning Java (7), and I was fortunate enough to grab a copy of Jay Bryant's book, Java 7 for Absolute Beginners. There's a bit of contradiction here... I surely am a beginner in Java, but I have known C# for a decade now, and the pleasant surprise I got when I started reading the book!

The 2 programming softwares were very identical, I could say 99%, in form and substance. And of course, going through the history of how they came about, why woulnd't they be? It is just that they originated from two rival camps, but the structure and capabilities given to them, I believe were at par.

The curiosity came about while job hunting: there were many job ads that indicated the need for a Java developer, but in parenthesis, C#.NET are welcome to apply. Took me a few job ads to realize the obvious, but then again, not immediately.

You see, I shun away from Java years ago, even though I was using native C in my school days. That was due to my poor experience with UNIX, but then again, it was not a mandated skill, and when I was starting to learn UNIX, I just didn't have a nice encounter with the OS, being already exposed to DOS, which is more verbose when it comes to its commands. Then I came across BASIC, then QBASIC. This really put a wedge between me and UNIX, the power and capability of which I will never know. I simply can't 'grep' the commands, and with nobody around to guide me, it became 'awk'-ward. I mean, I can read and learn by doing when I can, but I simply didn't get that chance - which I got with DOS and BASIC.

So I was quite surprised when I finally got to learn Java; I was at home, very much at home. Even so, the abstract-ness of the two software became more familiar to me. That was good, I never skipped a page, and the things that I would have forgotten in C#, the terms, the methodologies, they were refreshed in my memory, and what's more, I am learning Java!

Now, being so at ease with Visual Studio IDE made me a bit frustrated with the IDEs that were available for Java development. I have been trying to put my hand in on Android programming, and I started with Eclipse IDE, which is too much for beginners. Just look at the list in their website, and it would be too much, so overwhelming, really. As for Android, I have also tried Android Studio, by Jet Brains.

There is also NetBeans. The feature that I was looking for in Eclipse and NetBeans is the feature that I become accustomed with in Visual Studio, two actually, namely: intellisense and auto-completion. Now, I am not saying that Eclipse and NetBeans don't have these features, but the behaviour isn't what I wanted. Eclipse would automatically add ".*;" after pressing enter. That isn't the case for NetBeans.

Oracle offers JDeveloper IDE, but sadly, you have to be really a geek to make it run: I can't even install it! I've been doing softwares since 1996, but I have chosen a motto that if anything should work, it should be easily usable, even by the dumbest person.

There are many other Java IDEs available, but one IDE I have tried and I will keep: Jet Brains' IntelliJ. Fortunately, they have the Community Edition, which is free, and while being a smaller version of the Ultimate edition, the feature is not. Of course, the intellisense and auto-completion features are very close to what you get in Visual Studio.

So now at least I have two options for Java IDE: NetBeans and IntelliJ. Both free, both having the intellisense and auto-completion features, less the irksome behaviour.

Till then!

Enhanced by Zemanta

17 October, 2013

Stylesheet folder or directory - could make or break your web apps

English: CSS rule in Malayalam
English: CSS rule in Malayalam (Photo credit: Wikipedia)
17-October-2013

I have been reading on ASP.NET, so at least I learn something new. I have been coding and coding and coding, and I have become the woodcutter who did not sharpen his axe. And with the slowdown in load (all major projects completed, and pending roll-out only), I have some free time on my hand.

I found an e-book of Beginning ASP.NET 4.5 in C# and VB, and I skipped the chapters that discussed basic web development, but coming to Chapter 3, I found the CSS section a bit of an eye-opener. Not that I know nothing of CSS -- it is something that I have used extensively on my site, but not entirely the optimum way. And what I have just learned, I tried to apply on one of my simple web applications.

Did I find something to blog on?

You betcha!

I am one who always practiced organization, and I just find that the stylesheet file that was created in the process is 'mixing' with the code files. I just didn't like that. So in the middle of streamlining the CSS codes, have done some pages already, I moved the stylesheet to the \App_Code folder. There was no objection in the IDE...

So, I completed migrating all the inline and embedded styles into the Stylesheet file, so they are all in one common place, and this gave me a chance to remove all redundant and duplicate styles. Wow! Just think of the junk I created... And that is just in the simple web apps...

Anyway, having done everything, I now proceeded to test if what I did works.

Surprise, surprise!

In IE, it did not work. I am using IE10, running in Windows 7 Enterprise. The fonts and colors are all using the default values.

I tried it in Maxthon, in most likelihood, the closest browser to IE. The same behaviour was observed.

I now tried Firefox, and the styles came forth, shining through!

But since the majority of browsers used in our company is IE, I have a problem...

I tried defining the font in the individual rule sets, since the * { font: ...} rule doesn't seem to work at all.

No change.

I put the font definition in the body { ... } rule, and still, no effect.

At this point, I now thought of doing one thing: search the web. Search the web for similar issues and of course, the possible solution to my problem.

Found one article that mentioned the problem to be related to some server issues, and also on the folder/directory that keeps the stylesheet file. Spaces must be replaced with underscore (_).

Well, mine is having an underscore (\App_Code\), so I ruled it out.

I stopped for a while, and tried to think some more...

Then, out of a wild guess, I thought of moving the stylesheet file out of \App_Code\ folder, and back into the main folder.

Did that work?

Yes, it did!

So it wasn't the folder having spaces, and it wasn't the server behaving erratically, but simply, and I confess I don't know why (I don't understand it), the problem was simply due to where the stylesheet file was located.

So a few more code corrections, putting back all those definitions [ * { font: ... } ], and making sure all sections work, I published my modified web apps.

Hopefully it is much faster now.

Till then!
Enhanced by Zemanta

04 March, 2013

WORKING SOLUTION: Exception from HRESULT: 0x80070057 (E_INVALIDARG)

Visual Studio
Visual Studio (Photo credit: Jonathan Caves)
04-Mar-2013


Last week there were some issues that came up while I was editing one of my intranet sites, and there was one particular error that came up:

Exception from HRESULT: 0x80070057 (E_INVALIDARG)

It was pointing to some dll errors, and the particular dll being pointed at, I deleted and added, repeatedly.

The same error I got, and again, I would have to keep my hands off my head, or I would be pulling my hairs. And why not, the IDE is simply telling me that this certain “ABC.dll” is the culprit, but fixing it the normal way, deleting and adding, offers no resolution at all.

It didn’t take me long to consider checking from the web anything that might be of help, and as quickly as I decided, quickly did I find the help that I just needed.

The article pointed to some temporary files that have to be deleted, so that the IDE (I was in debug mode) could rebuild everything from scratch. “Oh boy,” I thought, “this is something like rebooting a computer to rebuild once again system files.” And I followed the instruction presented in that short article.

And true enough, after deleting the temporary files in the Framework folder, the error was gone, and I was sent back on my way to successful coding.

And so this is what I want to share, as it might be of help to anybody and everybody.

Till then!

Reference:
Exception from HRESULT: 0x80070057 (E_INVALIDARG)
Enhanced by Zemanta

09 September, 2011

Visual Studio 2010 and Maxthon 3

Sams Teach Yourself ASP.NET Ajax in 24 HoursI have been following the examples in the book ASP.NET AJAX in 24 hours, and I am doing it in both Visual Studio 2005 and Visual Studio 2010. While the book is targetted for use in VS2005, I did find that there is not much difference in the codes between VS2005 and VS2010, so I was finding the examples working in both IDEs, or rather, the examples are able to function properly regardless of which IDE is used.

Until...

I was coding the simple calculator, which is but 2 textboxes and a label, where the addends and the sum/total are entered/shown.

VS2005 defaults to using IE, and VS2010 uses whatever is the default browser that is set in your system, and it so happened that in the PC I am using at work, it was set to Maxthon (v3).

Somethings don't work properly...

The Ajax functionalities are all working fine with VS2005, but when coded in VS2010, something doesn't work here and there, now and then. It was not the same control, or the same functionality, everytime, from code to code, so for some time, I was baffled.

I was wondering whether it was due to the fact that the book was meant for VS2005, and I am using VS2010. I didn't get this for some time.

Sams Teach Yourself ASP.NET 3.5 in 24 Hours, Complete Starter KitFurthermore, when I tried things at home, the behaviour was the same. Of course, my default browser is Maxthon 3, so at least, in this aspect, the results were repeatable.

Then I don't know what I did, what I clicked, but perhaps in desperation, I clicked something, then the very simple Ajax-enabled calculator, which immediately adds up the two numbers (and works even when only 1 number is entered; adds to 0), started working.

Actually, the behaviour was consistent. One label was named A, and the other, B, and if A is not working, exchanging the label IDs will make B not work, and A work.

So finally I discovered what was causing the problem.

Maxthon 3's lightning mode.

I switched the debug tab to retro mode, and things started to work well and properly.

I went back to all the examples, and with each debug run, I switch to retro mode, and IE and Maxthon 3 handled all the Ajax functionalities as if they were one and the same browser.

Microsoft ASP.NET 4 Step by Step (Step by Step (Microsoft))And if you are encountering the same issue with Visual Studio 2010 and Maxthon 3, this could be the same rootcause - and solution.

Drop me a note if this post has been of help to you.

Till then. Happy Ajax-ing!


Enhanced by Zemanta

07 August, 2011

ASP.NET AJAX in VS2005

Cover of "Foundations of ASP.NET AJAX (Ex...Cover via Amazon07-August-2011

I was given a project at work that involves, writing web pages, instead of the usual Windows Forms (GUI) and console applications. Thus began the bumpy journey into learning ways and means of building web applications – from scratch.

Well, at least that is the level that I am starting off – from the ground.

I had my short course taken on advanced windows programming, and ASP.NET 3.5 within a week. I learned a couple of things that were fundamental to developing robust windows applications, and using the appropriate classes and methodologies. And when I came back to work, I have to undo a lot of those bricks that I have laid down wrongly. It was quite a very taxing job, as I have to keep the codes running while the cleaning is on-going.

I’m still not done.

And i have to begin a new project, completely different from what I have been doing for the past 10 years.

Actually, I created a very simple web application in the past years before, and it is running, and so simple was it that when it ran, I left it as it was, and forgot all about that I ever did when I built it from scratch.

And I have to go back and learn ASP.NET once again, and this time, the project is quite of a size that I have to learn correctly, and I have to learn fast.

Setting many stories aside, after the short courses, I am pretty sure that I didn’t become an expert – immediately. I had to do a lot of coding, since a lot of these hands-on is to make sure that I understand what I have learned and to help me retain the skill, which I am sure ill get enhanced as my skill level goes from one notch to the next level up.

After a lot of books were borrowed from the library, I finally got one that helped me leverage those head knowledge that I got from reading Bulletproof Ajax, and the counterpart Codin’ for the Web, etc. I learned straightforward HTML and CSS from W3 School’s books, which were mostly a compilation of their online lessons.

Before the book I am holding now, I actually found Scott Guthrie’s tutorial on building web pages, for while the tutorial is short, the learning is tremendous. Thanks, ScottGu for all the good work you are doing for the rest of all the other programmers around the globe.

The book I found to be discussing in the same frequency as my learning style is Foundations of ASP.NET AJAX by Robin Pars, Laurence Moroney and John Grieb. This is accompanied with examples which is downloadable from Apress.com.

Having said that, I should be on my way to a continuous and enjoyable and fruitful learning, right?

Not quite.

I am using both VS2010, and VS2005.

Now I am one who is quite eager to make full use of VS2010, since there is so much that this IDE has to offer, compared to VS2005. But then again, things don’t quite run well (maybe not yet) in VS2010, and this problem forced me to go back to using VS2005. I am still using VS2005, but I am slowly and steadily migrating my codes all to VS2010. So I’m doing this in parallel.

Now, between VS2005 and VS2010, aside from the differences in the IDEs themselves, things should be quite the same, isn’t it?

Not quite, for the second time.

Remember that I am learning ASP.NET AJAX.

The problem is that in VS2005, AJAX extensions and toolkit isn’t an integrated part of the IDE, which means a separate installation has to be made.

The AJAX Control Toolkit comes from a download binary file, or the full source code is available, from www.codeplex.com, which is also linked to the download page if you go to the official ASP.NET website www.asp.net/ajax.

Actually, if you look at the methods offered in the many pages found in the web, it is very simple and straightforward. But then again, is your problem solved right away?

Not quite, for the third time.

Let me cut to the chase, and share what I have learned.

For VS2010, it was straightforward. AJAX Extensions was already in the toolbox, and adding the AJAX Control Toolkit was as simple as downloading from www.codeplex.com the version that was suited for it (toolkit v4.)

As for VS2005, this is a completely different matter altogether.

How do I begin to tell you my small adventure?

Well, I assumed things would be the same, so searching for the toolkit set for VS2005 in www.codeplex.com, I was pointed to release 20229. And instruction was to just download the NOSOURCE version if you have no intention whatsoever of extending the toolkit.

That I did, but I got an error that baffled me:

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral…

I wrestled with this error message. Some articles in the web pointed to using the AJAX toolkit with the source code, which is actually a solution with 4 projects, and open that in VS2005, do a full build, and use the toolkit dll file found in SampleWebsite\Bin directory.

That I did, and was the problem solved? Nah!

I did quite a lot of searching… until…

I found that VS2005 SP1 must be installed before adding in the AJAX toolkit. So I searched for VS2005 SP1, installed it after checking whether it is already installed or not, and to make sure, I installed it over the currently installed SP1. Then I added in the AJAX toolkit by the NOSOURCE toolkit dll file. Still no success.

Actually, I tried to use the toolkit solution, but I can’t build the projects because it is looking for the Web.Extensions 1.0.61025.0 version, which is still missing.

Finally, what led me to the solution that fixed my problem is the result set I got when I searched through Google the following string: “System.Web.Extension 1.0.61025.0 error” – through this I found that I should have installed ASP.NET AJAX 2 Extensions 1. Afterwards, the adding of AJAX Control Toolkit tab is a natural.

SUMMARY:

If you are intent in having the AJAX tabs (extension and toolkit) in your VS2005 toolbox, here are the things that you should have and do, in sequence of operation/importance:

  1. Make sure that you have VS2005 SP1 installed.
  2. Install ASP.NET AJAX 2 Extensions.
  3. Download AJAX Control Toolkit (FULL, or NOSOURCE) Version 1.0.20229 from www.codeplex.com.
  4. Add in the Toolkit items using AjaxControlToolkit.dll from either the Full or NOSOURCE version (SampleWebSite\Bin folder, whichever folder you saved it).
  5. If you want the extender, build the AJAX Toolkit solution Template project, and make sure it has no errors and build completely, then click/double-click on AjaxControlExtender.msi (found in AjaxControlToolkit\TemplateVSI\bin folder).

Happy AJAXing!

Enhanced by Zemanta

18 April, 2011

Scriptin' with Javascript and Ajax

Charles Wyke-SmithImage by linoleum jet via FlickrI am done reading this book, and while I can say that it is almost in the same line of methodologies as the other book from Riders (Bulletproof Ajax), they have different offerings.

Scriptin' focuses on reuseable javascripts, and the final two chapters is supposed to be a working example that brings in all the discussed knowledge.

Unfrotunately for me that can't materialize. It was dealing with PHP, and I don't have a server that runs PHP.

Anyway, the javascripts I have learned just fine, expecially those nice formatting techniques, stripes, character counting, etc., etc.

And of course, these functionalities, more or less, are somewhat available in the Visual Web Developer toolkit.

So what's good about this book?

I know from the ground up how these already-available controls work. If I have to code by hand, I may struggle, but I can survive. I can continue. I won't be stuck.

I can go on Scriptin'!
Enhanced by Zemanta

24 March, 2011

Force termination of Apps; unable to load installer (.vdproj) file in .NET IDE

Image representing Microsoft Silverlight as de...Image via CrunchBaseI encountered some problems with my applications today, and searched the web for help.

> I saw one article (I quickly closed, so I am unable to reference it here) that instructed the single-line code:

Application.Exit()
Environment.Exit(0)

Application.Exit() is used when you are running a WinForms app.
Environment.Exit() is used when you are running a Console app.

If you need the values to be supplied with the method call, these are below, by standard:

0 - Success
1 - InvalidLogin
2 - InvalidFilename
10 - UnknownError


-----

The other problem I encountered on one development machine, not just today, but a few days back, and also today, is the problem of the .NET IDE not loading the installer project. And this only happens in one machine. All the rest are okay.

What came up in my web search are a couple of suggestions, solutions by users having the same problem:

> Run a registry cleaner, like CCleaner. And this is especially if you have done uninstallation of softwares, especially similar products recently.
> The steps below, taken from a forum's article, :

1. Make sure that Visual Studio user project/item templates location is right. (Menu: Tools > Options > Projects and Solutions)
Default path for VS2005 for projects is: %UserProfile%\My Documents\Visual Studio 2005\Templates\ProjectTemplates
Default path for VS2005 for items is: %UserProfile%\My Documents\Visual Studio 2005\Templates\ItemTemplates
*%UserProfile% refers to C:\Documents and Settings\

2. Run devenv.exe /ResetSkipPkgs (Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, then starts Visual Studio.)

3. Use devenv.exe /setup to restore the VS settings to their original state. If you have, for instance, packages that failed to load and you clicked the button to disable them from loading in the future, you can get them back again with the /setup switch. The original problem that caused the package to fail to load may or may not have been corrected so you may need to correct that before all packages load correctly.
This is similar to /ResetSkipPkgs, but also gets newly installed packages resource info completely registered.

4. Run devenv.exe /ResetSettings to isolate the settings problem

5. Visual Studio uses a cache on disk of all the installed project/item templates, to rebuild the cache, please run devenv.exe /InstallVSTemplates (in Start > Run or "Visual Studio 2005 Command Prompt")



-----

I have applied the single-line code to my affected application, and to the others that are okay, in case they do. I have cleaned the registry using CCleaner. It didn't work.

I have also followed all the steps above, from 1 to 5, and the problem persists.

I have now performed reinstallation of VS2005.


> After some time, I find that this has not been how I expected to be fixing this problem. I thought it was easy. My VS2005 reinstallation encountered some error. I remember manually uninstallating a lot of those MS softwares, like Silverlight, RIA toolkits, Expression Blend, etc., etc. I may have removed some critical softwares...

I am reinstalling those MS softwares that I know are critical, and I'm keeping my fingers crossed...

Till then!



Enhanced by Zemanta

07 July, 2010

Running javac in Windows

Image representing NetBeans as depicted in Cru...Image via CrunchBase
I just began my self-study in java using Netbeans 6.9 IDE, and I just managed to get through the "Hello World!" code using the IDE, which is followed by running the same small program in the shell.

I typed the compiler as indicated in the directions, but I got an error, like 'javac is not recognized....' or something like that.

I searched the web, which is usually my primary source of assistance, as it is with my self-study matters, and I got the first page with the top results containing the solution to my problem.

It is simply including the javac location in the PATH declaration.

So I did.

I opened up a Windows Explorer, right click on My Computer, and on Properties, then on Advanced tab, then on Environment Variables, then on the top window, which is the user's "User variables".

Open up "PATH" or "path", whichever is the one in your PC, then include the javac directory, for my case, is "C:\Program Files\Java\jdk1.6.0_01\bin> javac". That means going to the end of the current definition, adding a semicolon, then the file location, which is again, "C:\Program Files\Java\jdk1.6.0_01\bin> javac".

Click on OK, then the other OK, and the final thrid OK.

That sets the path for javac. There is no need to restart your PC, as was the case for me. But if javac still isn't recognized, try to do a restart, to be sure.

Till then.

Enhanced by Zemanta