Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Eblah (Read 11,466 times)
Tea-Master
YaBB Legends (Active)
*
Offline



Posts: 3,623
Location: Germany
Re: Eblah
Reply #19 - Sep 27th, 2005 at 11:55am
Post Tools
regexs are great but i think there should be a validator class which provides methods to validate the data. regexs are always a point of failure and often misunderstood so we may end up with changing regexes often and in lots of places.
  

--> also known as Agent Zed Wink
Back to top
 
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Eblah
Reply #18 - Sep 27th, 2005 at 3:24am
Post Tools
The way I see it, there are three possible ways to handle variables that don't pass the test. The first way is to totally discard the data. I suggest that this is the way to handle non-standard data, as the UDO doesn't have an official format for it.
The second way is to do some replacements on the characters that aren't allowed, like removing or replaceing all invalid characters with, say, "Q".
The third way is to specially handle a data type from a specific board. This is the best way of the three (keeps the most data) but is the most impractical due to the sheer number of board types out there.

The second way is probably the best (and required pretty much for required fields) way to handle it. Maybe the converter should provide a few validation routines to make checking things easy? Or are regexs good enough?
« Last Edit: Sep 27th, 2005 at 3:24am by AK108 »  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Tea-Master
YaBB Legends (Active)
*
Offline



Posts: 3,623
Location: Germany
Re: Eblah
Reply #17 - Sep 26th, 2005 at 5:16pm
Post Tools
hm ak good point about the data validation. every board may expect the data being in an other format. i.e. what about usernames? the one board allows characters like $% and the other does not. replace them with an underscore and if it results into an other existing name add a number right behind it? what about telephone numbers? passwords? userid's (loginname instead of number)? and the list goes on... in some cases replacements will become a very big issue resulting in lots of changes (if the field is referenced several times in different places).
what ever the converter does it has to display a list of changes it made of course.

Quote:
I was thinking that maybe we should have an official Driver list, where the drivers conform to our standards, including naming in their UDOs.  This would be the best way to ensure that the user downloads quality/working software.

What do you think?

yes that should be established for sure.
  

--> also known as Agent Zed Wink
Back to top
 
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #16 - Sep 25th, 2005 at 9:30am
Post Tools
I like the idea of prefixing non-standard names with _.  I'll add it to the doc soon.
  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Eblah
Reply #15 - Sep 24th, 2005 at 9:33pm
Post Tools
We could establish accepted names for all things that are common (such as username, password, displayname, aim, iamadmin, iamgmod) and then have them translate in and out. You would indeed have to expand it whenever a board came out with a new feature, but the output driver should use regexes to verify that the data is the expected type (icq is all numbers, iamadmin is on or off).

Say Board X came out with a "GlobalX ID" for their profile. The Board X input converter could feed the UDO a "_global_x_id" field (preceding it with an underscore to indicate that it isn't standerd yet) and set the version of the field to "Board X 1.2.3". Then, an output converter can later try to understand it, and if it passes the version test and and the regex test, it could be converted. Otherwise, it'll be discarded.

So it might look something like this (input driver)
Code
Select All
# In the convertmembers sub
$memberin{$username}{'_global_x_id'} = $file[12];
$datasourcegen = 'Board X'; # Generic name
$datasourcever = '1.2.3'; # Specific version 



Output
Code
Select All
if($datasourcegen eq 'Board X') {
     $memberout{$username}{'globalx'} = $memberin{$username}{'_global_x_id'};
     if($memberout{$username}{'globalx'} =~ /[^A-Za-z0-9_\-]/) {undef $memberout{$username}{'globalx'};} # Not safe to accept it if there's even one bad character
} 



Just an idea.
« Last Edit: Sep 24th, 2005 at 9:34pm by AK108 »  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #14 - Sep 24th, 2005 at 4:22am
Post Tools
Yeah, I'm still not sure about how to do the UDO.  I think breaking it up would be OK, but it's just more crap to pass around. (variable name wise Wink )

I think version info would be a very good idea.

I was thinking that maybe we should have an official Driver list, where the drivers conform to our standards, including naming in their UDOs.  This would be the best way to ensure that the user downloads quality/working software.

What do you think?
  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
Tea-Master
YaBB Legends (Active)
*
Offline



Posts: 3,623
Location: Germany
Re: Eblah
Reply #13 - Sep 23rd, 2005 at 9:41am
Post Tools
good work matt!
i'm not sure about the "universal data object", though.
you have to extend it everytime two forums share a new value to ensure that it's translated for the other forum.
it might be a good idea not only having a basic udo but additionally a specialised one. so the driver developer has the choise how complex he wants to make his converter. the specialised object would contain any extra data which the universal object does not provide(, yet?). it would include a version number or better a unique bb-identifier which includes the version (f.ex. "YaBB2RC3Build010905" or "phpBB2.6"). the output driver could verify against this identifier and handle the specialised information if available and appropriate. that way the developers around which are not in the YaBB team are undependent from us releasing a new UDO-class and they will more likely produce "better" converter drivers.
it may also be worth about thinking splitting the udo in several ones. one for messages, one for boards, one for members etc.
  

--> also known as Agent Zed Wink
Back to top
 
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #12 - Sep 23rd, 2005 at 4:49am
Post Tools
Well, I don't have any recommendations yet.  It took me a while to go through all the files.  It's a lot easier now than YaBB 1's layout was to decipher.

The code which writes the files out is VERY confusing.  We should at least keep some sort of documentation on how these files are stored.  The writing code is scrambled in a lot of files, but that's not the problem -- the problem is that it is scrambled in the wierdest places.

The code is good, but confusing as hell Smiley

I've pretty much finished my design doc, which you can get here:
http://www.mattsiegman.com/work/eblah.doc

(It's a lot longer now)
« Last Edit: Sep 23rd, 2005 at 4:55am by Matt Siegman »  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Eblah
Reply #11 - Sep 23rd, 2005 at 2:56am
Post Tools
I've scanned your PDF.  Looks like you are on the right track.

As far as the data structure goes, got any ideas how to improve it?  There's always YaBB 2.5 Smiley
  

Back to top
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #10 - Sep 23rd, 2005 at 2:52am
Post Tools
Holy crap YaBB's data structure is friggin... wow...

Eblah's was easy Smiley
  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
Outumuro
Documentation Team
Operations Team
****
Offline



Posts: 2,737
Location: Los Angeles, California
Re: Eblah
Reply #9 - Sep 22nd, 2005 at 6:53am
Post Tools
Reading through the thread over on E-Blah... seems like you're taking the right tact Corey (kudos).

Personally I think E-Blah and YaBB working cooperatively on converters is an excellent idea.  Cooperation between competitors is more common then some in the public would think.
  


Back to top
WWW  
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #8 - Sep 22nd, 2005 at 6:07am
Post Tools
I started going through the stuff.  I've been working on the design docs/specs for it so that my program can be nice, and like, work right.

Here is the current doc:
http://www.mattsiegman.com/work/eblah.pdf

Take a look and comment, but remember I'm not done with it.
  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
Matt Siegman
YaBB Legends (Inactive)
*
Offline



Posts: 3,380
Location: Wichita, KS
Re: Eblah
Reply #7 - Sep 22nd, 2005 at 2:38am
Post Tools
All that I'm using is the data structures.  It still may require research.

All code will be written by me.  All I'm doing is making my job easier by looking at something that's already got the format figured out Smiley

Edited:
Yeah, it'll require more research.
« Last Edit: Sep 22nd, 2005 at 2:42am by Matt Siegman »  

-- Matt Siegman 8) Wish List
Back to top
 
IP Logged
 
AK108
YaBB Legends (Inactive)
*
Offline



Posts: 3,321
Re: Eblah
Reply #6 - Sep 22nd, 2005 at 2:03am
Post Tools
There's nothing wrong with using their converter to help us out, as later on they could do the exact same. To "acid-test" our converter and make sure it's as good as theirs, we could convert back and forth and see if any data is lost.

Furthermore, the code is GPLed, so the license allows us to use their code, which I doubt we'll do.
  

Do not PM me for support.
Back to top
WWW  
IP Logged
 
Corey Chapman
YaBB Administrator
*****
Offline



Posts: 10,015
Location: Rock Hill, South Carolina

None
Re: Thanks Eblah ;)
Reply #5 - Sep 21st, 2005 at 10:38pm
Post Tools
http://eblah.com/forum/m-1127164588/s-0/highlight-YaBB/#num0

Please just read though.  We don't need to start any attacks with them, and I already replied when I shouldn't have....  (still some frustrations that I have to hold back)
« Last Edit: Sep 21st, 2005 at 10:44pm by Corey Chapman »  

Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top