Archive | Development

3403 Error in SQL – Combat Data Loss with SQL Repair Tool

3403 Error in SQL – Combat Data Loss with SQL Repair Tool

The SQL Server comprises of two fundamental elements; one is the “data files” and the other is the “transaction log files.” It is the transaction log file that records databases’ uncommitted transactions. Sometimes a problem arises when SQL Sever service unexpectedly shuts down to any unpredictable reason. After this accidental shut down, when the user tries to restart the server again, it analyzes all the SQL transaction log files. Now, if the transactions are not committed, then the changes that were performed as a part of those transactions are rolled back. But unfortunately, sometimes, this process of recovery does not successfully ends and thus leaving the database in the corrupted state only. In such situation, the user requires restoration from the last good backup. But, if no such backup is there or is damaged, then the only solution left with the user is to use an SQL database recovery tool for repairing MDF files which is the most apt and wise way for SQL database repair. The error 3403 During the SQL Server database corruption, the user encounters the below error message: Error 3403, Severity 22 During recovery initialization, page %ld was encountered. This page belongs to object %ld, not the log Cause of SQL Server error 3403 When the MS SQL Server crashes, it itself tries to recover without user intervention. When this automatic recovery takes place, there happens a complete scan of transaction logs up till the last page. If a page is found which is allocated to syslogs but the page header object ID does not match with that of syslogs, in that case, error 3403 is displayed and recovery is failed. Recovering SQL server database using an outside solution for SQL database 3403 error fix is the only way out of this problem. Such recovery is not difficult with a highly reliable SQL repair tool by SysTools for restoring SQL server databases from .mdf files. Reasons for such error display Failed SQL recovery and display of 3403 error occurs due the following plausible reasons: An SQL server problem resulting in a bad write or page allocation The user updates the allocation page and SQL Server goes down prior to the writing of the transaction log page. So, on the time of automatic rebuilding of SQL database, it happens without the clearing of the transaction log pages and the old log entries still existing. Solution for SQL database recovery This situation can be dealt by checking the backup status. If there is an existence of a clean backup, then one should drop the damaged or corrupted database and should load it from the backup. But, in the case where no backup exists, the user should use professional help from a good SQL recovery application for repairing MDF files. SysTools software for SQL database recovery SysTools SQL recovery tool is a reliable SQL database 3403 error fix software that will facilitate SQL database repair quickly, easily without a flaw. So, to combat data loss try SQL repair tool of SysTools and become error free and tension free!

Go straight to Post

Posted in Development0 Comments

Use of Hibernate With Java Persistence Api

Use of Hibernate With Java Persistence Api

 
Before we start any discussion about Persistence technologies, we need to understand what exactly Persistence is in computer science. Persistence, in simple terms is the ability to retain data structures between various program executions. A perfect example of this would be a word processor saving undo history. In practice, this is achieved by storing the data in non- volatile storage such as a file system or a relational database or an object database.
 
The popularity of databases has increased manifold in the past few years. Java has become the preferred choice of developers for developing secure, flexible, and scalable database driven web applications. These web applications require objects to be associated with appropriate databases. Hibernate, along with other persistence technologies associate’s objects with the appropriate database in a simple, straight forward and natural way.
 
Hibernate is one such effort from the Java community to develop many object oriented solutions to data persistence. Any kind of Java persistence solution includes two main elements i.e. ORM (Object Relational Mapping) and OOM (Object Oriented Modeling).
 
Hibernate has become immensely popular amongst the developer community as it is a free, powerful, high performance open source object – relational mapping persistence Java package that makes it easier to work with relational databases for Java Applications.
 
Apart from Hibernate, other popular open source Java persistence technologies include JDBC, abates, JDO, Top Link and CMP Entity Beans. These technologies provide a standardized object-relational mapping mechanism.
 
Java persistence application programming Interface or JAVA Persistence API is the latest version of the Java Data Objects (JDO) technology which was the earlier persistent technology used by developers. JPA or the Java Persistence API is the latest Java Specification standard for java enterprise applications. The Java Persistence API is a java programming language framework that allows developers to manage relational data in Java standard edition and Enterprise Edition applications. Java Persistence API originated as part of the work of the JSR 220 expert group.
 
 
The java persistence API’s has been developed after drawing upon the best ideas from other prevalent persistence technologies like Top link, JDO, Hibernate etc. In simple words, Java Persistence API is a Plain Old Java Object API for object /relational mapping and supports a rich, SQL –like query language for both static and dynamic queries.Vendors involved in application development have found that the use of Hibernate technology with Java persistence API’s helps build flexible, database driven web applications that are highly scalable and involve complex business processes.
 
 
 
The Java Persistence API is the standard object/relational mapping and persistence management interface of the Java EE 5.0 platform and Java Web Services Development . As part of the EJB 3.0 specification effort, it is supported by all major vendors of the Java industry for improving Java Web Development in India and Globe.

More Java Articles

Go straight to Post

Posted in Java0 Comments

Encryption Using Rsa Algorithm in Java

Encryption Using Rsa Algorithm in Java

Encryption using RSA algorithm in java
 
Introduction
In this article I will provide you an approach of using RSA algorithm for long String. As you know that RSA algorithm is limited 117 bytes, long strings can not be encrypted or decrypted. However it is possible to break the bytes into several chunks and then to encrypt or decrypt the contents. This algorithm is used for asymmetric cryptography. For asymmetric cryptography, you can click this link.
 
Technicalities
In this article I provide below the complete example for encryption and decryption of long strings. If you use the method of Cipher class ie.doFinal( byte[] bytesString), it will throw exception that it can be encrypted for more than 117 bytes for RSA.  But in the real application, you may not be sure about the length of the String you want to encrypt or decrypt. In this case you have to break the bytes and then to encrypt it. Please refer to the
Following complete example.
 
Complete example
 
Class name : SecurityUtil.java
 
package com.dds.core.security;
 
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Security;
import java.security.spec.EncodedKeySpec;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
 
import javax.crypto.Cipher;
 
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
 
import com.sun.crypto.provider.SunJCE;
 
/**This is a utility class which provides
 * convenient method for security. This
 * class provides the way where you can
 * encrypt and decrypt the String having
 * more than 117 bytes for RSA algorithm
 * which is an asymmetric one.
 * @author Debadatta Mishra(PIKU)
 *
 */
public class SecurityUtil {
            /**
             * Object of type {@link KeyPair}
             */
            private KeyPair keyPair;
            /**
             * String variable which denotes the algorithm
             */
            private static final String ALGORITHM = “RSA”;
            /**
             * varibale for the keysize
             */
            private static final int KEYSIZE = 1024;
 
            /**
             * Default constructor
             */
            public SecurityUtil() {
                        super();
                        Security.addProvider(new SunJCE());
            }
 
            /**
             * This method is used to generate
             * the key pair.
             */
            public void invokeKeys() {
                        try {
                                    KeyPairGenerator keypairGenerator = KeyPairGenerator
                                    .getInstance(ALGORITHM);
                                    keypairGenerator.initialize(KEYSIZE);
                                    keyPair = keypairGenerator.generateKeyPair();
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
            }
 
            /**This method is used to obtain the String
             * representation of the PublicKey.
             * @param publicKey of type {@link PublicKey}
             * @return PublicKey as a String
             */
            public String getPublicKeyString(PublicKey publicKey) {
                        return new BASE64Encoder().encode(publicKey.getEncoded());
            }
 
            /**This method is used to obtain the String
             * representation of the PrivateKey.
             * @param privateKey of type {@link PrivateKey}
             * @return PrivateKey as a String
             */
            public String getPrivateKeyString(PrivateKey privateKey) {
                        return new BASE64Encoder().encode(privateKey.getEncoded());
            }
 
            /**This method is used to obtain the
             * {@link PrivateKey} object from the
             * String representation.
             * @param key of type String
             * @return {@link PrivateKey}
             * @throws Exception
             */
            public PrivateKey getPrivateKeyFromString(String key) throws Exception {
                        PrivateKey privateKey = null;
                        try {
                                    KeyFactory keyFactory = KeyFactory.getInstance(ALGORITHM);
                                    EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(
                                                            new BASE64Decoder().decodeBuffer(key));
                                    privateKey = keyFactory.generatePrivate(privateKeySpec);
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return privateKey;
            }
 
            /**This method is used to obtain the {@link PublicKey}
             * from the String representation of the Public Key.
             * @param key of type String
             * @return {@link PublicKey}
             * @throws Exception
             */
            public PublicKey getPublicKeyFromString(String key) throws Exception {
                        PublicKey publicKey = null;
                        try {
                                    KeyFactory keyFactory = KeyFactory.getInstance(ALGORITHM);
                                    EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(
                                                            new BASE64Decoder().decodeBuffer(key));
                                    publicKey = keyFactory.generatePublic(publicKeySpec);
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return publicKey;
            }
 
            /**This method is used to obtain the
             * encrypted contents from the original
             * contents by passing the {@link PublicKey}.
             * This method is useful when the byte is more
             * than 117.
             * @param text of type String
             * @param key of type {@link PublicKey}
             * @return encrypted value as a String
             * @throws Exception
             */
            public String getEncryptedValue(String text, PublicKey key)
            throws Exception {
                        String encryptedText;
                        try {
                                    byte[] textBytes = text.getBytes(“UTF8″);
                                    Cipher cipher = Cipher.getInstance(“RSA/ECB/PKCS1Padding”);
                                    cipher.init(Cipher.ENCRYPT_MODE, key);
 
                                    int textBytesChunkLen = 100;
                                    int encryptedChunkNum = (textBytes.length – 1) / textBytesChunkLen
                                    + 1;
 
                                    // RSA returns 128 bytes as output for 100 text bytes
                                    int encryptedBytesChunkLen = 128;
                                    int encryptedBytesLen = encryptedChunkNum * encryptedBytesChunkLen;
                                    System.out.println(“Encrypted bytes length——-”
                                                            + encryptedBytesChunkLen);
                                    // Define the Output array.
                                    byte[] encryptedBytes = new byte[encryptedBytesLen];
 
                                    int textBytesChunkIndex = 0;
                                    int encryptedBytesChunkIndex = 0;
 
                                    for (int i = 0; i
                                                if (i
                                                            encryptedBytesChunkIndex = encryptedBytesChunkIndex
                                                            + cipher.doFinal(textBytes, textBytesChunkIndex,
                                                                                    textBytesChunkLen, encryptedBytes,
                                                                                    encryptedBytesChunkIndex);
 
                                                            textBytesChunkIndex = textBytesChunkIndex
                                                            + textBytesChunkLen;
                                                } else {
                                                            cipher.doFinal(textBytes, textBytesChunkIndex,
                                                                                    textBytes.length – textBytesChunkIndex,
                                                                                    encryptedBytes, encryptedBytesChunkIndex);
                                                }
                                    }
                                    encryptedText = new BASE64Encoder().encode(encryptedBytes);
                        } catch (Exception e) {
                                    throw e;
                        }
                        return encryptedText;
            }
 
            /**This method is used to decrypt the contents.
             * This method is useful when the size of the
             * bytes is more than 117.
             * @param text of type String indicating the
             * encrypted contents.
             * @param key of type {@link PrivateKey}
             * @return decrypted value as a String
             */
            public String getDecryptedValue(String text, PrivateKey key) {
                        String result = null;
                        try {
                                    byte[] encryptedBytes = new BASE64Decoder().decodeBuffer(text);
                                    Cipher cipher = Cipher.getInstance(“RSA/ECB/PKCS1Padding”);
                                    cipher.init(Cipher.DECRYPT_MODE, key);
 
                                    int encryptedByteChunkLen = 128;
                                    int encryptedChunkNum = encryptedBytes.length
                                    / encryptedByteChunkLen;
                                    int decryptedByteLen = encryptedChunkNum * encryptedByteChunkLen;
                                    byte[] decryptedBytes = new byte[decryptedByteLen];
                                    int decryptedIndex = 0;
                                    int encryptedIndex = 0;
 
                                    for (int i = 0; i
                                                if (i
                                                            decryptedIndex = decryptedIndex
                                                            + cipher.doFinal(encryptedBytes, encryptedIndex,
                                                                                    encryptedByteChunkLen, decryptedBytes,
                                                                                    decryptedIndex);
                                                            encryptedIndex = encryptedIndex + encryptedByteChunkLen;
                                                } else {
                                                            decryptedIndex = decryptedIndex
                                                            + cipher.doFinal(encryptedBytes, encryptedIndex,
                                                                                    encryptedBytes.length – encryptedIndex,
                                                                                    decryptedBytes, decryptedIndex);
                                                }
                                    }
                                    result = new String(decryptedBytes).trim();
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return result;
            }
 
            /**This method is used obtain the
             * {@link PublicKey}
             * @return {@link PublicKey}
             */
            public PublicKey getPublicKey() {
                        return keyPair.getPublic();
            }
 
            /**This method is used to obtain
             * the {@link PrivateKey}
             * @return {@link PrivateKey}
             */
            public PrivateKey getPrivateKey() {
                        return keyPair.getPrivate();
            }
}
 
The above class provides several useful methods for generation of Private key , Public Key and encryption of String and decryption of String.
 
Please refer to the following subordinate classes for the above class.
 
Class name : KeyGenerator.java
 
package com.dds.core.security;
 
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.Properties;
 
/**This class is used to generate the
 * Private and Public key and stores
 * them in files.
 * @author Debadatta Mishra(PIKU)
 *
 */
public class KeyGenerator {
            /**This method is used to obtain the
             * path of the keys directory where
             * Private and Public key files are
             * stored.
             * @return path of the keys directory
             */
            private static String getKeyFilePath() {
                        String keyDirPath = null;
                        try {
                                    keyDirPath = System.getProperty(“user.dir”) + File.separator
                                    + “keys”;
                                    File keyDir = new File(keyDirPath);
                                    if (!keyDir.exists())
                                                keyDir.mkdirs();
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return keyDirPath;
            }
 
            /**
             * This method is used to generate the
             * Private and Public keys.
             */
            public static void generateKeys() {
                        Properties publicProp = new Properties();
                        Properties privateProp = new Properties();
                        try {
                                    OutputStream pubOut = new FileOutputStream(getKeyFilePath()
                                                            + File.separator + “public.key”);
                                    OutputStream priOut = new FileOutputStream(getKeyFilePath()
                                                            + File.separator + “private.key”);
 
                                    SecurityUtil secureUtil = new SecurityUtil();
                                    secureUtil.invokeKeys();
 
                                    PublicKey publicKey = secureUtil.getPublicKey();
                                    PrivateKey privateKey = secureUtil.getPrivateKey();
 
                                    String publicString = secureUtil.getPublicKeyString(publicKey);
                                    String privateString = secureUtil.getPrivateKeyString(privateKey);
 
                                    publicProp.put(“key”, publicString);
                                    publicProp.store(pubOut, “Public Key Info”);
 
                                    privateProp.put(“key”, privateString);
                                    privateProp.store(priOut, “Private Key Info”);
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
            }
}
 
The above class is used to generate the Public and Private keys. It generates and stores them in different files called Public.key and Private.key. Please refer the test harness class for the above class.
 
Class name: TestKeyGenerator
 
import com.dds.core.security.KeyGenerator;
 
/**This is a testharness class
 * for the KeyGenerator class.
 * @author Debadatta Mishra(PIKU)
 *
 */
public class TestKeyGenerator {
      public static void main(String[] args) {
            KeyGenerator.generateKeys();
      }
 
}
If you run the above class, you will find a directory called keys in your root path of your application folder. In this folder you will find two files one is for Private Key information and another is for Public Key.
There is another class which is used to obtain the Private key and Public key information stored in the files.
 
Class name: KeyReader.java
 
package com.dds.core.security;
 
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.security.PublicKey;
import java.util.Properties;
 
/**This class is used to read the
 * keys from the file.
 * @author Debadatta Mishra(PIKU)
 *
 */
public class KeyReader {
            /**This method is used to obtain the
             * string value of the Public Key
             * from the file.
             * @return String of {@link PublicKey}
             */
            public static String getPublicKeyString() {
                        String publicString = null;
                        try {
                                    Properties prop = new Properties();
                                    String publicKeyPath = System.getProperty(“user.dir”)
                                    + File.separator + “keys” + File.separator + “public.key”;
                                    InputStream in = new FileInputStream(publicKeyPath);
                                    prop.load(in);
                                    publicString = prop.getProperty(“key”);
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return publicString;
            }
 
            /**This method is used to obtain the
             * String of Private Key from the file.
             * @return String of private key
             */
            public static String getPrivateKeyString() {
                        String publicString = null;
                        try {
                                    Properties prop = new Properties();
                                    String publicKeyPath = System.getProperty(“user.dir”)
                                    + File.separator + “keys” + File.separator + “private.key”;
                                    InputStream in = new FileInputStream(publicKeyPath);
                                    prop.load(in);
                                    publicString = prop.getProperty(“key”);
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
                        return publicString;
            }
}
 
This is a utility class to read the Public and Private keys from the files.
 
Now refer to the test harness class which makes encryption and decryption of String.
 
import java.security.PrivateKey;
import java.security.PublicKey;
 
import com.dds.core.security.KeyReader;
import com.dds.core.security.SecurityUtil;
 
/**
 * This is a test harness class for encryption and decryption.
 *
 * @author Debadatta Mishra(PIKU)
 *
 */
public class TestEncryption {
 
            public static void main(String[] args) {
                        String privateKeyString = KeyReader.getPrivateKeyString();
                        SecurityUtil securityUtil = new SecurityUtil();
                        String publicKeyString = KeyReader.getPublicKeyString();
                        try {
                                    PublicKey publicKey = securityUtil
                                    .getPublicKeyFromString(publicKeyString);
                                    PrivateKey privateKey = securityUtil
                                    .getPrivateKeyFromString(privateKeyString);
                                    String originalValue = “provide some very long string”;
 
                                    String encryptedValue = securityUtil.getEncryptedValue(
                                                            originalValue, publicKey);
                                    System.out.println(“EncryptedValue—–” + encryptedValue);
                                    String decryptedValue = securityUtil.getDecryptedValue(
                                                            encryptedValue, privateKey);
                                    System.out.println(“Original Value——” + decryptedValue);
 
                        } catch (Exception e) {
                                    e.printStackTrace();
                        }
            }
 
}
 
This test harness class is used to encrypt and decrypt the long string contents. You can also use the same method for file encryption and decryption. First you have to read the contents of a file as String and then you can apply method to encrypt it.
 
Conclusion
I hope that you will enjoy my article for this asymmetric cryptography for RSA. For asymmetric cryptography please refer to the link http://www.articlesbase.com/information-technology-articles/asymmetric-cryptography-in-java-438155.html. If you find any problems or errors, please feel free to send me a mail in the address debadattamishra@aol.com . This article is only meant for those who are new to java development. This article does not bear any commercial significance. Please provide me the feedback about this article

Go straight to Post

Posted in Java0 Comments

Dealing With the Threat of an Sql Injection Attack

Dealing With the Threat of an Sql Injection Attack

One of the biggest security issues present in ASP and PHP is the SQL injection. The thing with ASP and PHP is that they have flaws that let web developers make unintentional mistakes in creating SQL queries, leading tovulnerabilities in security. These are easy to fix, but do require some tinkering and research. Preventing SQL Injections An effective way to prevent SQL injections is to validate all user inputs thoroughly, identifying meta-charactersso you can filter them all out. You must place filters properly so they can remove anything that is not known good data. Utilizing account lockout policies can also help by safeguarding your system from brute-forcing. Always remember thatsecurity validation must be done server-side and never through client-side authentication methods like JavaScript since it can be bypassed by simply turning off JavaScript in the internet browser. As with numeric input like age, telephonenumber, credit card number, and so on, values should be processed through special functions to make sure that the entered value only has numbers in it, as well as spaces if necessary. It would do good to limit the number of characters allowed to whatis necessary also just to be sure. Do the same with dates, integers, and floats to leave no holes, or just have them in drop-down boxes. If selected through a drop-down box you should still validate the input as a hacker could submit their own htmlto the server using a text/hidden field instead of a dropdown. Remember that just because your form only lists valid values in a drop-down or radio-group or tick-box, a hacker can still submit any value they want for that field. You should assumethat all input fields (regardless of type) can be submitted to the server as if it’s any text value. For string inputs, on the other hand, it may be necessary to have certain meta-characters allowed. For example, people would have names likeO’Neil, so you need to set the apostrophe (single quote) as allowed. In such scenarios, the name should be accepted and perhaps replace the quote with two quotes before putting it into the database just to be safe. It would be helpful to limit thenumber of characters like with numerical values since an unlimited number of characters can be utilized by someone who is planning to initiate an SQL injection attack. Threat Management and Damage Control You can clean up your code asthoroughly and as obsessively as you want, but you will still need assurance. The solution to this problem isn’t free, but is a good long-term investment, especially if your database has very sensitive data like bank account information, contactnumbers, email addresses, physical addresses, and so on. In these cases, an SQL injection tool is required to help you with the process. The best thing you can get is a trusty SQL injection scanner to detect any attacks whenever possible.These are enterprise-level applications available for companies to install onto their servers, so you don’t have to worry much about client-side implications other than making sure that customers can still enter data correctly. If ever therereally was an SQL injection attack, you will have to remove that filth. That is where an SQL injection removal program comes in. Usually available with the SQL injection scanner as a suite, it can be used for damage control so that you can stillsecure whatever precious data there may be while removing the threat from your system. This is definitely a must-have for emergencies, which makes it a worthwhile investment. With your SQL injection tool in hand, you can increase security ofyour website’s database exponentially, thwarting any injection attempts from cracking through. Combining this with careful prevention, you can make sure that data is secure, no matter what. You cannot rely too much on your SQL injection scanner totell you what’s wrong and your SQL injection removal software to take care of mishaps. Prevention is always better than cure.

Go straight to Post

Posted in Development0 Comments

What is the Ajax Enabled Google Tool-kit?

What is the Ajax Enabled Google Tool-kit?

First things first, Asynchronous JavaScript and XML (AJAX) is not a technology. AJAX is a technique that has brought about a great change in the world of web development.

The AJAX technique comes in response to theincreasing demand of interactive web applications. With AJAX, web page exchange small amount of data with the server behind the scene. This means that every time a new piece of data is entered by the user, or there is a request for a change, theentire page does not have to be reloaded. Usability is also greatly affected thanks to AJAX. After all, AJAX creates conditions that are conducive to a complex scenario that is both data-centric and user-centric. The difference between web pages andother applications has been thinned down with the help of AJAX.

As already mentioned, AJAX is not a technology and this technique fuses together various existing technologies such as XHTML (or HTML), CSS, the DOM, XMLHttpRequest (oralternatively IFrame), XML.

Here is how these individual technologies play a role in AJAX:

• XHTML (or HTML) and CSS are used for mark up and styling information.

• The DOM (DocumentObject Model) is employed for the actual interaction that happens with the information that is presented.

• The exchange of data asynchronously with the web server happens with the use of XMLHttpRequest. Although there are manycases where an IFrame object is used in its place.

• Even though even preformatted HTML would work, XML is the format often used for the transfer of data between the server and the client.

The advantages anddisadvantages of using AJAX are in fact open for interpretation. Here are some of the reasons that are cited as advantages of using AJAX.

• The main reason for using AJAX is to enhance the user experience, and to make web pagesbehave more like standalone applications.

• AJAX enabled pages load faster because it generates HTML within the browser. The net result of the page loading in a staggered manner is the bandwidth consumption for a web page isconsiderably reduced.

• The third advantage is widely critiqued because of a common misconception about AJAX – that it is a mix n’ match of various techniques, not leaving room for any consistency. Yet with AJAXprogrammers tend to create a distinct separation between the methods and formats that are employed for the purpose of information delivery. In other words separation between the content that is to be delivered, the structure and style elements of thewebpage, and the functionality of the webpage.

On the flip side are the disadvantages that people associate with the use of AJAX.

• Given that, with AJAX, the page does not register with the history engine ofthe browser, the user is often unable to use the ‘Back’ function of the browser. Additionally, AJAX also makes it difficult for users to ‘Bookmark’ a page at a certain stage of us. The solutions created to tackle these problemshave not been adequate, and these issues remain unresolved for the most part.

• The possible delay between user request and server response, is an obvious drawback of AJAX. This lag, known as network latency is made worse by aphenomenon that has nothing to with the technologies involved. When a page is rendered in entirety the human eye naturally re-adjusts itself to identifying the changed elements of refreshed page. On the other hand, when smaller portions of the pageare rendered individually the user may not see the change immediately and imagine latency when it in fact does not exist.

• Another possible problem is that search engines cannot execute the JavaScript that is a part of theAJAX functionality. It is important to note that this particular problem is not restricted to AJAX.

• Yet another issue with AJAX is compatibility. JavaScript, which AJAX depends on, may be implemented differently by differentbrowsers.

At the face of it, the disadvantages seem to weigh over the advantages making AJAX seem a less viable option for developers. There is no doubt that AJAX is complex, and there are still not many developers who areacquainted with its language. Yet a change has been brought about with Google slotting AJAX in their applications.

Google’s move is a landmark event in the web development arena. Google applied compilers to help them carryout this mammoth task. Compilers give developers the chance to code/develop in a higher-level language, which it converts to a lower-level language which the computer understands. A Java to JavaScript compiler was created so that developers couldwork in the former and leave it to the compiler to convert the same into the latter. This technology was freely shared with the developer community and is known as the Google Web Toolkit (GWT).

The GWT development cycle is ratherstraightforward:

1. Use Java to design, develop, debug, and test. In this process you may or may not choose to employ GWT libraries that seem of use. You are free to use any of the Java tools that you feel comfortable with –Eclipse, IntelliJ, JProfiler, JUnit.

2. Use the GWT’s compiler that distills the application from Java to a set of JavaScript and HTML files which can work with any web sever.

3. Ensure compatibility of theapplication with the browsers you want to support.

GWT can be run in two modes – hosted mode and web mode.

Hosted mode: Most of the development time ordinarily would be spent in this mode because since yourapplication is run as Java byte code within the Java Virtual Machine (JVM), you can have the benefit of employing the debugging facilities in Java.

Web mode: In this mode, the application is run as pure JavaScript and HTML errors that occur with JavaScript such as typos and type mismatches can be identified at the time of compilation. There is often a conflict between what is easy for developers to do, and what is beneficial for users. This conflict, needless to saymust end in the favor of what is beneficial for users. And the net result of using GWT and making things more convenient for developers would of course a better web experience for users.

The main features of the Google Web Toolkitare:

• Even though, unlike traditional HTML web applications, GWT applications do not need to fetch new HTML pages as they execute, they do in fact need to get data from the server. Also referred to as a server call, thismechanism is better known as Remote Procedure Call (RPC) and enables interaction with the server across a network.

• The presence of dynamic and reusable UI (User Interface) frameworks. The key difference between UI frameworksin GWT in comparison to others is the way widgets (Java classes on the client-side that are used to build user interface) are rendered.

• Full-featured debugging in the hosted mode.

• Allows for theappropriate management of browser history.

• Automatic compatibility with different browsers is yet another attractive feature of GWT applications.

• Yet another feature of the GWT is that it helps youinternationalize your applications and libraries.

• GWT allows you to unit test in a debugger and browser.

• With the help of the JavaScript Native Interface (JSNI) you can add handwritten JavaScript inthe Java code.

• The most important feature of the GWT is the fact that it is completely open source code.

For the uninitiated, all this sounds too technical. But the very purpose of GWT is to extractdevelopers from the web of technicalities and give them space to create something that speaks with their end-user. And the demand for interactive spaces online is only going to increase. The AJAX trend is catching up and thanks to GWT developers areable to slowly but surely get over their initial apprehensions about the difficulties that AJAX poses. The role of developers in the development lifecycle of a web application cannot be undermined, but with AJAX enabled GWT their role actually ceasesto be just that of typing together back-end operations. Google Maps is an excellent example of the advantages of working with AJAX within the GWT framework. Google map is definitive example of something that is dynamic, attractive and completelyuser-friendly. Finding locations and using functionalities such as zoom in/out instantaneously is a tremendous advancement. Imagine, having to interminably wait for the page to reload when you click on a location or search for it in the search bar?The very purpose of having the map would be defeated, if it was going to take just as much time to look for a specific location online as it would on a printed map. There are some detractors who say

AJAX enabled GWT is thepractical way forward. End-users hardly take this for granted, but the work that goes behind creating this ultimate user-experience pays off. And indeed, GWT has made ease of development possible without losing out on user-satisfaction. Withtechniques like AJAX, and systems like GWT the future of web development is one that holds a lot of promise for users and developers alike!

Go straight to Post

Posted in Development0 Comments

The system cannot self repair this error – while accessing SQL database

The system cannot self repair this error – while accessing SQL database

Database Console Commands (DBCC) check the logical and physical consistency of the SQL database and can also resolve few detected error messages. But there are many issues that can not be resolved by using DBCC commands. In suchscenarios, the SQL database corruption mainly occurs due to corrupt metadata, corruptions in certain critical system base tables or hardware failure. For absolute and systematic recovery of SQL database, the user needs to use effective SQL Recoveryapplication.The error message that appears when a user attempts to access SQL database is:”The system cannot self repair this error”After a user encounters the above error message, the data saved in the SQLdatabase becomes inaccessible. The main cause of the above error message is SQL database corruption due to corrupt system database files, Page Free Space (PFS) page damage or corrupt metadata. Another main reason for the above error message can befaulty hardware. To resolve the above error and access the data in SQL database, the user needs to follow these steps:1) The user can restore the database from latest backup.2) The user can run DBCC commands with repair option. (Forthe above error message, the DBCC command can not repair the database.) 3) If there is a hardware issue, the user needs to replace the hard drive.If the above measures fail to perform, then the user needs to recover the inaccessibledata by using efficient SQL recovery software. A SQL Recovery application incorporates advanced and powerful scanning algorithms to recover the lost data.Stellar Phoenix SQL Database Recovery is the most advanced SQL Recovery softwarethat repairs and restores the corrupted and damaged .mdf files from MS SQL Server database. With Stellar’s SQL repair software, you can perform complete SQL Database Recovery in all possible data loss scenarios. This read only SQL Repairapplication can Repair SQL objects including tables, views, saved procedures and triggers. It provides interactive and intuitive user interface and supports MS SQL Server 2005 and MS SQL Server 2000. This SQL Repair utility can also recover andrestore the backup files of MS SQL Server.

Go straight to Post

Posted in Development0 Comments

On –server Ajax, a Paradigm Shift That Brings the Ajax Benefits to Enterprises

On –server Ajax, a Paradigm Shift That Brings the Ajax Benefits to Enterprises

Typical AJAX = Client Server

Client side AJAX is similar to Client Server computing in that it shifts much of the application logic to the client. It enables savvy Javascript developers to develop applications which makethe most of the browser and the computer they’re running on, while freeing the server to focus on non UI tasks. Client side AJAX suggests that application flow and UI related logic be developed in DHTML and Javascript all connecting with serverside “services” which can communicate as XML web services , plain text or JSON (JavaScript Object Notation).

The trend towards AJAX has not passed over enterprises and line of business applications. Developers are constantlytrying to cope with ever growing demands while improving the overall user experience. However, AJAX has brought on new challenges when used in the enterprise.: securing direct connections between the client and server “services” isproblematic; needing to master both client sides (Javascript, DHTML) and server-side technologies is a burden and ensuring consistent performance regardless of bandwidth and desktop computing power is impossible.

On Server AJAX =On Server computing

The On-Server AJAX paradigm shift is lead by Visual WebGui.

The approach, coined by Guy Peled as “On- Server AJAX”, means the entire application flow, UI logic and validations are developed andprocessed on the server while the browser serves as a “display” for the output and a “receptor” for user input. As with Server based computing, On- Server AJAX simply reflects the “screens” to the client, captures userinput from the client and reflects the incremental changes back to the client all over a highly optimized communications channel. In the case of On- Server AJAX there is no need to consider the “screen” as purely a graphical representationof the application – a bitmap, but rather it can be considered as a series of related components which change according to the application logic. In effect this is similar to how X-Windows communicates changes to X-Terminals by transferringcomponent changes between the client “host” and the server’s state.

On-Server AJAX, opens the path for enterprises to enjoy the AJAX evolution benefits

Server based computing platforms such as Citrix andWindows Terminal Services have grown in popularity as a result of no alternatives means of supporting heavy deployments of client-server line of business applications over web. Their costs are accordingly. On-Server AJAX paradigm shift allows for thefirst time, to support deployments of complex AJAX line of business applications in unprecedented simplicity, by-design security, no-limit complexities all at dramatically reduced costs.

Eliminating the security hazard, facilitatingenterprises usage

Client side AJAX requires the browser to connect directly to a web service or even a raw data provider. Since this is a very dangerous practice, developers usually connect to a proxy application service which understandsthe “context” of the request by recalling session state. There are numerous articles discussing the security challenges presented by client side AJAX. For consumer internet sites, the improved user experience has usually overridden thesecurity concerns. However, for enterprise applications this is still a key concern.

On-Server AJAX utilizes a client side “rendering” engine which communicates with the server over XMLHttp. The rendering engine uses aproprietary protocol to incrementally update the view. The client never consumes data or services directly since all of the application logic, UI logic and data access is handled on the server. The client simply connects to the “view” onthe server and therefore never compromises security. Furthermore, since a proprietary protocol is used to correlate view state between the server and the client, it’s a greater challenge to override, eavesdrop or hack.

In addition inOn -Server AJAX, the only data that is delivered to the client is data that can be viewed on the client meaning there is never any sensitive data that may be required for logic or validation beyond what is rendered and seen by the user on thescreen.

Developer Productivity in building complex enterprise level GUIs, as never before

While AJAX has brought a significant improvement in user experience and application complexity, it has also brought about a dramaticincrease in the complexity of development and testing. Furthermore it requires developers to a number of different languages: Javascript, HTML, CSS and XML on the client as well as the server side language being used to develop the underlyingbusiness logic.

A complex web application such as Microsoft Outlook Web Access or Salesforce.com also requires serious architecting skills in order to maintain application state, security and data integrity between local cached data andserver side data. While historical, page based web applications were deemed easier and cheaper to develop then their desktop counterparts, developing a complex client based AJAX web application is harder and more expensive to develop then anequivalent client-server application.

On-Server AJAX paradigm shift enables the developer to use a single language and programming model in order to design the application UI and the underlying logic. In addition it alleviates the needto understand and deal with the web’s innate statelessness. Instead On-Server AJAX offers the use of well known design patterns and tools such as WinForms to design and develop highly interactive, data rich applications with the sameproductivity of desktop applications.

Simplifying the architecture from a loosely coupled, stateless, multi-language/technology into a tightly coupled, object oriented, single language environment means less time is spent on architecture,development, debugging and maintenance ultimately improving ROI and TCO. In addition the layout and interaction design are not as limiting as most web oriented application development platforms.

On-Server AJAX developers also enjoy re-useof well honed skills (WinForms) and existing code which further improves productivity.

For technological Gurus opinion on On-Server AJAX productivity see:

MS MVP RICK STRAHNL on his blog: “Visual WebGui is intriguing. It’sridiculous how productive you can be with a tool like this compared to building an ASPX page. But somehow it feels like cheating…”. ” http://west-wind.com/weblog/posts/180727.aspx

MVP ROY OSHOROVE on his blog:” “…VisualWebGui can help change the web development world and make it more usable, reachable and easier than ever…” http://weblogs.asp.net/rosherove/archive/2007/07/28/visual-web-gui-helps-me-write-in-winform-and-run-as-asp-net.aspx

Go straight to Post

Posted in Development0 Comments

Use of Hibernate With Java Persistence Api

Use of Hibernate With Java Persistence Api

Before we start any discussion about Persistence technologies, we need to understand what exactly Persistence is in computer science. Persistence, in simple terms is the ability to retain data structures between various program executions. A perfect example of this would be a word processor saving undo history. In practice, this is achieved by storing the data in non- volatile storage such as a file system or a relational database or an object database.
The popularity of databases has increased manifold in the past few years. Java has become the preferred choice of developers for developing secure, flexible, and scalable database driven web applications. These web applications require objects to be associated with appropriate databases. Hibernate, along with other persistence technologies associate’s objects with the appropriate database in a simple, straight forward and natural way.
Hibernate is one such effort from the Java community to develop many object oriented solutions to data persistence. Any kind of Java persistence solution includes two main elements i.e. ORM (Object Relational Mapping) and OOM (Object Oriented Modeling).
Hibernate has become immensely popular amongst the developer community as it is a free, powerful, high performance open source object – relational mapping persistence Java package that makes it easier to work with relational databases for Java Applications.
Apart from Hibernate, other popular open source Java persistence technologies include JDBC, abates, JDO, Top Link and CMP Entity Beans. These technologies provide a standardized object-relational mapping mechanism.
Java persistence application programming Interface or JAVA Persistence API is the latest version of the Java Data Objects (JDO) technology which was the earlier persistent technology used by developers. JPA or the Java Persistence API is the latest Java Specification standard for java enterprise applications. The Java Persistence API is a java programming language framework that allows developers to manage relational data in Java standard edition and Enterprise Edition applications. Java Persistence API originated as part of the work of the JSR 220 expert group.
The java persistence API’s has been developed after drawing upon the best ideas from other prevalent persistence technologies like Top link, JDO, Hibernate etc. In simple words, Java Persistence API is a Plain Old Java Object API for object /relational mapping and supports a rich, SQL –like query language for both static and dynamic queries.
Vendors involved in application development have found that the use of Hibernate technology with Java persistence API’s helps build flexible, database driven web applications that are highly scalable and involve complex business processes.
The Java Persistence API is the standard object/relational mapping and persistence management interface of the Java EE 5.0 platform and Java Web Services Development . As part of the EJB 3.0 specification effort, it is supported by all major vendors of the Java industry for improving Java Web Development in India and Globe.

Go straight to Post

Posted in Java0 Comments

SEO for Ajax Website

SEO for Ajax Website

AJAX (Asynchronous JavaScript + Xml) mixes of technologies that offers incredible functionality for web sites and get rid of the page reloads. In simple words AJAX brings software like usability to websites. You can have an idea ofAJAX features by visiting following web pages:

- Google Maps

- Google Suggest

- Meebo.com

- AJAX Word

- AJAX Spreadsheet

You must have idea now what functionality canbe added to any website using AJAX. But AJAX website is not search engine friendly. The main reason of AJAX website not ranking well in search engines is that AJAX web pages cannot be easily bookmarked and also not proffered by search engines. Thepages created are not unique and cod itself is not visible to search engines.

This doesn’t mean that AJAX websites cannot rank well in search engines. You can use search engine optimization techniques discussed below and make yourwebsite search engine friendly as well as rank in top organic listings for your major keywords.

First issue is that AJAX is not visible to search engines. Therefore any content delivered through AJAX or say if websites navigation isdelivered through AJAX. Hence search engine will only be able to crawl first page will less or no content. Spiders will not be able to spider other pages as navigational link are not visible to them. So what is the solution to this? Simple way is tomake sure your website content and navigation is in HTML. This will serve you double benefits i.e. content in HTML is easily read by search engines and also will be visible to visitors who have JavaScript turned off or where browsers don’t supportJavaScript.

Second important factor was no unique URLs. I will say just visit your website as a search engine spider would. Make sure all your web pages have a proper path, content, moreover they have valid URLs. Other way is to useURL rewrite to create URLs that are search engine friendly. The mod rewrite instruction are useful in this your web page will be created dynamically but gives search engines an impression of unique URL with unique content.

Related Ajax Articles

Go straight to Post

Posted in Development0 Comments

watch Dynamo Kyiv vs Ajax 2010 Games Online Free – Watch Dynamo Kyiv vs Ajax Game Online Live

watch Dynamo Kyiv vs Ajax 2010 Games Online Free – Watch Dynamo Kyiv vs Ajax Game Online Live

Watching Dynamo Kyiv vs Ajax is often a extremely enjoyable activity, which is why many men and women look forward to it. There’s nothing like viewing the Dynamo Kyiv vs Ajax on TV even though sitting back and drinking a cold a single. This is also greatest carried out live. Watching live Dynamo Kyiv vs Ajax could be the way to do it. Unfortunately, some cable providers and dish networks don’t provide all the games of every sport stay. Which is why there’s only one location to observe Dynamo Kyiv vs Ajax are living totally free.Watch Dynamo Kyiv vs Ajax Games Online live streamingHave you ever been at school, at work, or anywhere for that matter and you also just had to learn the score on the large game. Regardless of whether its football, basketball, hockey, baseball, socceror even tennis, when you are curious in regards to the score of the Dynamo Kyiv vs Ajax or what’s happening in that distinct game, you just need to know what’s happening appropriate then and there. Now it is possible mainly because it is possible to observe Dynamo Kyiv vs Ajax stay cost-free. You might have every game at your fingertips, all you need is world wide web and also you will probably be capable to view unlimited sports forever.Watch Dynamo Kyiv vs Ajax Games Online live streamingYou’ll find two kinds of sports fans in this globe, those that care about the video games, and those that pretend to care about the game titles. If you’re like me then you actually do care concerning the outcomes of game titles involving your favorite sports teams, which is why you will need to have 24/7 access towards the games dwell. Time to watch Dynamo Kyiv vs Ajax are living totally free. The days of paying additional for dish services or paying that monthly cable bill is over. Join the movement.

Find More Ajax Articles

Go straight to Post

Posted in Development0 Comments