Uncategorized

Singleton Design pattern

0

Singleton is a design pattern used to limit the number of a class instances to one (or may be more)
and restricting any user wants a new object to use the already constructed object eliminating multiple copies of the same object
(more…)

Javascript form validation

0

Client side validation is so important
by preventing the user from submitting wrong data into the server, it would be better for the server not receiving invalid data and it’s better for the user not to wait until the page reloads tells him that the data is incorrect.

some examples we may check for

  • Required
  • Length
  • Minimum/Maximum (numerical input)
  • Pattern (E-mail)

(more…)

Hello TCP sockets

0

A socket is a software endpoint that establishes bidirectional communication between a server program and one or more client programs.
It has two types UDP and TCP

  • UDP
    It’s a connectionless protocol.
    It doesn’t required initializing a connection before doing communication.
    there is no guarantee that the datagrams you have sent will be received in the same order by the receiving socket. You can’t know also if it’s received without defects or if it reached its destination
  • TCP
    It’s a connection-oriented protocol.
    a connection must first be established between the pair of sockets. While one of the sockets listens for a connection request (server), the other asks for a connection (client).
    It is guaranteed that the packets you send will be received in the order in which they were sent.

(more…)

Get cross-browsers AJAX Object

0


the default way to use the ajax feature is to make an instance from the XMLHttpRequest Object through this simplified statement

request = new XMLHttpRequest();

unfortunately older versions of Internet Explorer doesn’t have a native XMLHTTPRequest Object, but we can get one by getting it from an ActiveXObject

(more…)

build DOM XML from PHP

1
xml

xml file

if you want to make the php page returns a response in XML foramt
commonly used with ajax

        sample text

(more…)

Hello world!

1
class Hello
{
    public static void main (String[] arguments)
    {
        System.out.print("hello to my new blog");
    }
}
Go to Top