473,785 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JavaScript and inheritence

Hi everyone,

I have the following code using inheritence The important part is the
function getName(). The result should alert 'John Doe':

function First(name) {
this.name = name;

this.getName = function() {
return this.name;
}
}

function Doe(firstName) {
this.base = First;
this.base(firsN ame);

this.getName = function() {
return this.base.getNa me()+' Doe';
}
}
d = new Doe('John');
alert(d.getName ());

But it doesn't work, because it says this.base.getNa me() is not a function.

That could be, but how can I still accompish this? There is no
this.super or something as far as I know. Is there a nice way of
doing this. I figured I could do the following in Doe:

this.getParentN ame = this.getName;
this.getName = function() {
return this.getParentN ame()+' Doe';
}

But thats not very neat because when I inhert from this object and I
apply the same trick to that new object then I'll create neverending
recursion, finally causing a stackoverflow. Anyone know any other way?

Thanks in advance,
Vincent

Jul 23 '05 #1
11 1642
Lee
Vincent van Beveren said:

Hi everyone,

I have the following code using inheritence The important part is the
function getName(). The result should alert 'John Doe':

function First(name) {
this.name = name;

this.getName = function() {
return this.name;
}
}

function Doe(firstName) {
this.base = First;
this.base(firsN ame);
1. "firsName" is undefined. You should always copy and paste
tested code into your post, to avoid typos in your example
that aren't part of your original problem.

2. What do you intend for that line to do? You're invoking
a constructor without the "new" keyword.

this.getName = function() {
return this.base.getNa me()+' Doe';
}


At this point, this.base is a reference to the First function,
not an object of type First.

It seems as if you want your function Doe() to be:

function Doe(firstName) {
this.base = new First(firstName );
this.getName = function() {
return this.base.getNa me()+' Doe';
}
}

Nothing is really being inherited here, though.
It's just encapsulating an object.

Jul 23 '05 #2
In article <40************ **********@news .xs4all.nl>, Vincent van
Beveren <vi*****@provid ent.remove.this .nl> writes
Hi everyone,

I have the following code using inheritence <snip>But it doesn't work, because it says this.base.getNa me() is not a function.

<snip>

Maybe this example

<URL:http://www.jgharris.de mon.co.uk/jsfeats/JSfeats.html#se ca1p1>

will give you some ideas.

John
--
John Harris
Jul 23 '05 #3
> 1. "firsName" is undefined. You should always copy and paste
tested code into your post, to avoid typos in your example
that aren't part of your original problem.
Oops, yeah, I made some modifications for clearity. Apparently I
forgot to test it. This gives the error I'm having trouble with.

<SCRIPT LANGUAGE="JavaS cript">
function First(name) {
this.name = name;

this.getName = function() {
return this.name;
}
}

function Doe(firstName) {
this.base = First;
this.base(first Name);

this.getName = function() {
return this.base.getNa me()+' Doe';
}
}
d = new Doe('John');
alert(d.getName ());
</SCRIPT>
2. What do you intend for that line to do? You're invoking
a constructor without the "new" keyword.
[...]
Nothing is really being inherited here, though.
It's just encapsulating an object.


No, base is an official part of the JavaScript specification. Try this:

function Foo() {
this.test = 'Im from the base class';
}

function Bar() {
this.base = Foo;
this.base();
}

b = new Bar();
alert(b.test);

Thanks,
Vincent

Jul 23 '05 #4


John G Harris wrote:
Maybe this example

<URL:http://www.jgharris.de mon.co.uk/jsfeats/JSfeats.html#se ca1p1>

will give you some ideas.


Thanks, I looked through the code, but looking through the code I come
to the conclusion that there is no way to overwrite methods in JS.

The trick they use for the toString method is the following:

function Parent() {

this.parentToSt ring = function()
return "parent";
}

this.toString = this.parentToSt ring;
}

function Child() {
this.base = Parent;
this.base();

this.childToStr ing = function() {
return this.parentToSt ring()+" and child";
}

this.toString = this.childToStr ing
}

But thats a work-around. It would save a lot of trouble if there was
a simpleler way of using inherience:

function Parent() {

this.foo = "bar";

this.toString = function() {
return "parent";
}

}

function Child() {
this.base = new Parent();

this.toString = function() {
return this.base.toStr ing()+" and child";
}
}

c = new Child();
alert(c.foo);
alert(c.toStrin g());

The first alert would give "bar", the second "parent and child"

could anyone tell me why this is impossible in JavaScript? Or why this
hasn't been done yet?

Thanks,
Vincent

Jul 23 '05 #5
Vincent van Beveren <vi*****@provid ent.remove.this .nl> writes:
Thanks, I looked through the code, but looking through the code I come
to the conclusion that there is no way to overwrite methods in JS.
Interesting conclusion.
The trick they use for the toString method is the following:

function Parent() {
this.parentToSt ring = function()
return "parent";
}

Define function, assign it to current object's parentToString property ...
this.toString = this.parentToSt ring;
.... and assign same function to the toString property.
}

function Child() { this.base = Parent;
this.base();
These two lines is and idiom for using the Parent function to initialize
the CHild object being created. It doesn't create a Parent object, and
it uses the new object, this, as the "this" for the Parent function.
this.childToStr ing = function() {
return this.parentToSt ring()+" and child";
So this works, because "this" has a parentToString method.

But thats a work-around. It would save a lot of trouble if there was
a simpleler way of using inherience:
There is:
---
function Parent(){};
Parent.prototyp e.toString = function() { return "parent"; };

function Child(){};
Child.prototype .toString = function() {
return Parent.prototyp e.toString() + " and child";
};
---
function Parent() {
this.foo = "bar";
this.toString = function() {
return "parent";
}
}

function Child() {
this.base = new Parent();
So here you create a new Parent *object*. You create one for each
Child object. You can reference it, but it's just part of the Child
object.
this.toString = function() {
return this.base.toStr ing()+" and child";
}
}

c = new Child();
alert(c.foo);
alert(c.toStrin g());

The first alert would give "bar", the second "parent and child"
No, the first alert should give "udefined", because the Child object
doesn't have a "foo" property. It has a "base" property, which is a
Parent and which therefore has a "foo" property, but the Child object
doesn't have a "foo" property itself.
could anyone tell me why this is impossible in JavaScript?
No, because it is.
Or why this hasn't been done yet?


It has.
Ok, Javascript doesn't have *class* inheritance, mainly because it doesn't
have classes.

A Javascript constructor is just a function. When creating a new object
with the "new" operator on a constructor function "Foo", you
1: create a new object,
2: make its prototype link point to the object Foo.prototype,
3: execute Foo with "this" referring to the new object, and
4: if Foo returns an object, the new operator evalutes to that, otherwise \
it evaluates to the newly constructed object.

That is, inheritance in Javascript is between objects (the prototype
objects), not classes (which doesn't exist) or functions (which merely
acts as initializers and holders of the prototype object).

Example:
---
function Foo(){};
Foo.prototype.b az = "foo";
function Bar(){};
Bar.prototype.b az = "bar";

var foo = new Foo();
var bar = new Bar();

alert(foo.baz); // foo
alert(bar.baz); // bar

Foo.prototype.b az = "arglebargl e";

alert(foo.baz); // "arglebargl e" - dynamic inheritance

alert(foo instanceof Foo); // true
alert(foo instanceof Bar); // false
alert(bar instanceof Foo); // false
alert(bar instanceof Bar); // true

// swap prototype
var tmp = Foo.prototype;
Foo.prototype = Bar.prototype;
Bar.prototype = tmp;

// and the surprice
alert(foo instanceof Foo); // false
alert(foo instanceof Bar); // true - because Bar.prototype is foo's proto
alert(bar instanceof Foo); // true
alert(bar instanceof Bar); // false

alert(foo.baz); // arglebargle
alert(bar.baz); // bar
---
As the "surprice" shows, the inheritance/instanceof relation follows
only the prototype object of the constructor function, not the function
itself. The function merely holds the prototype, and when a new object
is created, the function is called to initialize the object.

So, there is no class based inhertance. So, what is it that you are
trying to achieve, exactly? Because we can emulate most of it, we just
need to know which part is needed. Douglas Crockford has a page on
how to emulate different kinds of inheritance in javascript:
<URL:http://www.crockford.c om/javascript/inheritance.htm l>
What you seem to want is to call the Parent constructor to initialize
the Child object as well as do the initialization of the Child.
You also want to refer to the Parent object's functions when the
Child overrides them.

For that, you can just do:

---
function Parent() {...}
Parent.prototyp e.xxx = ...;

function Child() {
// call Parent initialization
this.parentCons tructor = Parent;
this.parentCons tructor();
delete this.parentCons tructor;

// remember parent version
this.parentToSt ring = this.toString() ;
// use it
this.toString = function() {
this.parentToSt ring() + " and child";
}
}
---

However, that doesn't inherit the properties on the Parent.prototyp e
object.

The way I do that is:

---
function inheritObject(o bject) {
function Dummy(){};
Dummy.prototype = object;
return new Dummy();
}

function Child() {
Parent.call(thi s); // simpler than assigning it, calling it, and
// removing it again, but only works in modern browsers
// child initalization;
}
Child.prototype = inheritObject(P arent.prototype );
---

Example:
---
function Parent(i) { this.i = i; }
Parent.prototyp e.toString = function() { return "parent["+this.i+"]"; };
Parent.prototyp e.incI = function () { this.i++; };

function Child(i, j) {
Parent.call(thi s, i);
this.parentToSt ring = Parent.prototyp e.toString;
this.j = j;
}
Child.prototype = inheritObject(P arent.prototype );
Child.prototype .incJ = function () { this.j++; };
Child.prototype .toString = function() {
return this.parentToSt ring() + " and child[" + this.j + "]";
};
---

Now test this:
---
var p = new Parent(42);
var c = new Child(37,87);
alert(p.toStrin g()); // parent[42]
alert(c.toStrin g()); // parent[37] and child[87]
p.incI();
alert(p.toStrin g()); // parent[43]
alert(c.toStrin g()); // parent[37] and child[87]
c.incI();
alert(p.toStrin g()); // parent[43]
alert(c.toStrin g()); // parent[38] and child[87]
c.incJ();
alert(c.toStrin g()); // parent[38] and child[88]
alert(p.incJ); // undefined
---
That is, the child has inherited the "incI" method, and the toString
method has been assimilated :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #6
In article <40************ ***********@new s.xs4all.nl>, Vincent van
Beveren <vi*****@provid ent.remove.this .nl> writes


John G Harris wrote:
Maybe this example
<URL:http://www.jgharris.de mon.co.uk/jsfeats/JSfeats.html#se ca1p1>
will give you some ideas.


Thanks, I looked through the code, but looking through the code I come
to the conclusion that there is no way to overwrite methods in JS.

<snip>

I think you've got it the wrong way round. It's all too easy for Child's
toString method to hide Parent's toString. The difficult bit is finding
a way for a Child to call the Parent's toString.

In C++ you would write Parent::toStrin g, and something similar in other
languages. But this won't work in javascript because objects don't have
class names, so there isn't a name you could put in front of the :: .

Javascript is very different from other languages. Learn to do things
the javascript way - it's better than wishing for VBScript or C# :-)

John

PS My spelling checker wanted to change VBScript to javascript !
--
John Harris
Jul 23 '05 #7
Hi Lasse,

thanks for your insightful posting. I'll need to reread it a few times
in order to make it all clear to me.
So, there is no class based inhertance. So, what is it that you are
trying to achieve, exactly? Because we can emulate most of it, we just
need to know which part is needed.


Some kind of class-like inhertence, but not really with classes. I just
would like to create a one-on-one parent to child relationship. With
prototypeing it seems that I can only assign one parent to a group of
child objects. But that means that all childs have the same instance of
a parent.

The problem is that I have an object and I want to create a new one
extending the capabilities of the current object. However, each
instance of the extended object, needs to have it own instance of
the parent object.

I thought 'base' was a special keyword, but as I understand it, I can
just as wel do

function Y() {
this.blah = X;
this.blah();
delete this.blah();
}

I still don't understand why its impossible to assign a parent to a
child object as being really a part of the JavaScript language. Though
now I guess I know enough to make some sort of inhertence, I'm still not
convinced that there is a good way of doing it. For me a good way of
doing it would be what I described in my previous posting and is
somewhat like this:

function Parent() {
this.y = 123;
this.x = function x() {
alert('x');
}
}

function Child() {
this.parent = new Parent(); // now there is a parent
// child relationship.
}

c = new Child();
c.x(); // would alert 'x';

this.parent being reserved for referencing to the parent of the object.

So, this would not mess things up:

function SubChild() {
this.parent = new Child();
}

sc = new SubChild();
alert(sc.y); // would alert 123

Its a kind of prototyping but then not based on the function but on the
instance of the object itself.

Anyway, thanks for the post, and I think its enough to help me further,
but I still have the opinion that iheritence in JavaScript is more
complecated than it would have to be. Maybe I should join the ECMA ;)

Thanks,
Vincent

Jul 23 '05 #8
Lasse Reichstein Nielsen wrote:
[...]
However, that doesn't inherit the properties on the Parent.prototyp e
object.

The way I do that is:

---
function inheritObject(o bject) {
function Dummy(){};
Dummy.prototype = object;
return new Dummy();
}

function Child() {
Parent.call(thi s); // simpler than assigning it, calling it, and
// removing it again, but only works in modern browsers
// child initalization;
}
Child.prototype = inheritObject(P arent.prototype );
---


Can you provide a reasonable explanation and/or an example which
proves that the inheritObject() method is needed? AFAIS it is
not,

function Child() {
Parent.call(thi s);
// child initalization;
}
Child.prototype = new Parent();

would suffice. In your example, everything works OK with

function Parent(i) { this.i = i; }
Parent.prototyp e.toString = function() { return "parent["+this.i+"]"; };
Parent.prototyp e.incI = function () { this.i++; };

function Child(i, j) {
Parent.call(thi s, i);
this.parentToSt ring = Parent.prototyp e.toString;
this.j = j;
}
Child.prototype = new Parent();
// ^^^^^^^^^^^^^
Child.prototype .incJ = function () { this.j++; };
Child.prototype .toString = function() {
return this.parentToSt ring() + " and child[" + this.j + "]";
};

var p = new Parent(42);
var c = new Child(37,87);
alert(p.toStrin g()); // parent[42]
alert(c.toStrin g()); // parent[37] and child[87]
p.incI();
alert(p.toStrin g()); // parent[43]
alert(c.toStrin g()); // parent[37] and child[87]
c.incI();
alert(p.toStrin g()); // parent[43]
alert(c.toStrin g()); // parent[38] and child[87]
c.incJ();
alert(c.toStrin g()); // parent[38] and child[88]
alert(p.incJ); // undefined

in my Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040709
Firefox/0.9.0+.

BTW, Function.protot ype.call() can AFAIS be implemented as follows:

// types.js stripped down to the absolute necessary
function Types() {}
var types = new Types();
Types.prototype .OVERWRITE = 1; // Overwrite existing properties

/**
* Adds/replaces prototype properties of an object.
*
* @argument object o
* Object specifying the properties to be added/replaced.
* The name of each property serves as the name for the
* prototype property, its value as value as the value
* of that property.
* @argument number iFlags
* Flags for the modification.
*/
Function.protot ype.addToProtot ype =
function function_addToP rototype(o, iFlags)
{
for (var i in o)
{
if (typeof this.prototype[i] == "undefined"
|| typeof iFlags == "undefined"
|| (iFlags & types.OVERWRITE ))
{
this.prototype[i] = o[i];
}
}
}

if (isMethodType(t ypeof eval))
{
Function.addToP rototype(
{apply: /**
* Applies a method of another object in the context
* of a different object (the calling object).
*
* @prototype method
* @argument object thisArg
* Reference to the calling object.
* @argument Array argArray
* Arguments for the object.
*/
function function_apply( thisArg, argArray)
{
var a = new Array();
for (var i = 0, len = argArray.length ; i < len; i++)
{
a[i] = argArray[i];
}

eval("thisArg(" + a.join(", ") + ")");
},
call: /**
* Calls (executes) a method of another object in the
* context of a different object (the calling object).
*
* @argument object thisArg
* Reference to the calling object.
* @arguments _ _
* Arguments for the object.
*/
function function_call(t hisArg)
{
var a = new Array();
for (var i = 1, len = arguments.lengt h; i < len; i++)
{
a[i] = arguments[i];
}

eval("thisArg.t his(" + a.join(", ") + ")");
}
});
}

(CMIIW)
PointedEars
Jul 23 '05 #9
Thomas 'PointedEars' Lahn <Po*********@nu rfuerspam.de> writes:
Can you provide a reasonable explanation and/or an example which
proves that the inheritObject() method is needed? AFAIS it is
not,

function Child() {
Parent.call(thi s);
// child initalization;
}
Child.prototype = new Parent();

would suffice.
It works almost the same, except that the prototype is now an
initialized object. It will rarely matter, since the initialization is
repeated by the Parent.call(thi s) call. However, if the Parent
function takes arguments, then it is not obvious which to use for the
prototype instance, and you could potentially have an initialization
that overwrites different properties of the prototype depending on
how it's called.
---
function Complex(x, y, polar) {
if (!polar) {
this.x = x;
this.y = y;
} else {
this.mag = Math.sqrt(x*x+y *y);
var ang = this.mag > 0 ? Math.acos(Math. abs(x/this.mag)) : 0;
if (x < 0) { ang = Math.PI - ang; }
if (y < 0) { ang += Math.PI; }
this.ang = ang;
this.toString = function() {
return x+"+"+y+"i";
}
}
}
Complex.prototy pe.toString = function() {return this.x+"+"+this .y+"i"; }
---

Then it would be wrong to make a subclass like this:
---
function Sub(x, y, polar) {
Complex.call(th is,x,y,polar);
//...
}
Sub.prototype = new Complex(0,0,tru e);
---

(Obviously, I could initialize the prototype with (0,0,false) in this
example, but it's an example of what can go wrong).

It's purely defensive programming to use the inheritObject function.
By not executing any unnecessary code, the lieklyhood of an
incompatability , which will probably be hard to find, is minimized.
BTW, Function.protot ype.call() can AFAIS be implemented as follows:
.... call: /** .... function function_call(t hisArg)
{
var a = new Array();
for (var i = 1, len = arguments.lengt h; i < len; i++)
{
a[i] = arguments[i];
}

eval("thisArg.t his(" + a.join(", ") + ")");


Is "thisArg.th is" even syntactically correct? It seems to use
"this" as the name of a property, and "this" is a reserved word.
I assume this is what should call the function as a method
of thisArg.

Using "eval" seems to be the only way to implement a call with a
variable number of arguments (without using apply), but this way of
doing it is not sufficient.

The problem occurs if an argument doesn't convert to a string that is
a language literal for itself. Only numbers and booleans converts to
literals of themselves. If you pass the string "true" to this function,
then the argument to eval will contain the unquoted string "true", e.g.
function_call(" true")
will eventually evaluate the string:
thisArg.this(tr ue)
which is not the same call.

You can "stringify" strings, Array's, Object's and RegExp's using
literal notation, but it will fail to preserve the identity of the
objects.

For other objects, either created using your own constructors or using
build in types like Date, there is no literal notation. You might be
able to create a new object with a new constructor call with appropriate
arguments, but again it fails to preserve object identity.

You will probably also want to return the return value of the function
call.
A better approach is *not* to embed the values in the string to be
evaluated, but just embed references to local variables containing the
values. Those you have complete control over:
---
/**
* Finds a name that the given object doesn't have a property
* of that name.
*
* @param object Object to find property for.
*/
function findNonExisting PropertyName(ob ject) {
var prop = "x"; // would start at "" if all browsers were bug free
while (typeof(object[prop]) != "undefined" ) {
prop += "x";
}
return prop;
}

/**
* Calls function (this) as a method of the give object with
* the provided parameters
*
* @param object The object to use as "this" for the function call.
* @param ... arguments to the function.
*/
function functionCall(ob ject /*, ... */) {
var args = new Array();
var argNames = new Array();
for(var i=1;i<arguments .length;i++) {
args[i] = arguments[i];
argNames[i-1] = "args["+i+"]";
}
var nonEPN = findNonExisting PropertyName(ob ject);
object[nonEPN] = this;
var val = eval("object[\""+nonEPN+" \"]("+
argNames.join(" ,")+")");
delete object[nonEPN];
return val;
}
---

An example to show that it works:
---
Function.protot ype.myCall = functionCall;
var o = { x:42 };
function f(y) {
this.y = y;
return this.x;
}
var oarg = { toString : function() { return "THIS WORKED"; } };
var res = f.myCall(o, oarg);
alert([res, o.y, o.y == oarg]); // [42,THIS WORKED,true]
---

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4144
by: John | last post by:
Hi, I am trying to create a class heirarchy similar to the following: // base interface class ICar { public: virtual void start() = 0; }; // add members to that interface, but retain base capabilities
8
4227
by: Digital Puer | last post by:
I made the following table to help me (re)learn inheritence basics. Can someone check if it's correct? This table requires a courier-like font. Java C++ ---- --- subclass' methods can yes, default must use "virtual" in front override base class' of base class' method
5
2430
by: john bailo | last post by:
For a c# web application, I created a user control that includes a form in control. The idea is, on the main Page, when the user clicks Submit from the master form, that makes the user control visible and gives it new functionality, but retains the look of the top half of the master page. I then hide the original submit button. Ok, now, after pressing the Submit button in the user control, I want to change the look of the master page.
0
1376
by: Jan Elbæk | last post by:
Hi, I would like to make a base form in my project - which (almost) all forms must inherit from. The baseform must have some visible elements (a toolbar, a topaligned panel and a picturebox and perhaps some more). Also. I need it to have a specielized constructor in the base. And the baseform must implement some methods (like Setstatusbartext) - and som default eventhandlers (like Closing), which must be virtual so that additional code can...
16
3097
by: gorda | last post by:
Hello, I am playing around with operator overloading and inheritence, specifically overloading the + operator in the base class and its derived class. The structure is simple: the base class has two int memebers "dataA", "dataB". The derived class has an additional int member "dataC". I am simply trying to overload the + operator so that 'adding' two objects will sum up the corresponding int members.
19
1702
by: JKop | last post by:
Been thinking about the following: class Mammal { public: virtual void Mate(Mammal &) = 0; };
7
1985
by: preetam | last post by:
Hi, This question is more towards design than towards c++ details. By looking at books on design patterns and various google threads on the same topic, I see that composition is favoured to inheritence. One more article I read was Allen holub's "Why extends is evil". http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html One general advice I found was that - extending behaviour is better done with interfaces and...
7
1601
by: vj | last post by:
Hello Group, I am C++/OOP newbie and was working on a project when i came accross this puzzleing problem with inheritence. C++ Code ================== class Parent {
5
2126
by: Neelesh Bodas | last post by:
This might be slightly off-topic. Many books on C++ consider multiple inheritence as an "advanced" concept. Bruce Eckel says in TICPP, volume 2 that "there was (and still is) a lot of disagreement about whether is essential in C++". Are there any disadvantages of using multiple inheritence?
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.